<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>File Source for Yahoo.inc</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
						<h1>Source for file Yahoo.inc</h1>
<p>Documentation is available at <a href="../yos-social-php/_Yahoo.inc.html">Yahoo.inc</a></p>
<div class="src-code">
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;YOS&nbsp;PHP&nbsp;SDK&nbsp;for&nbsp;accessing&nbsp;social&nbsp;and&nbsp;data&nbsp;apis&nbsp;at&nbsp;Yahoo!</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yos-social-php</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;</span><span class="src-doc-coretag">@author</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Yahoo!&nbsp;Developer&nbsp;Network</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;</span><span class="src-doc-coretag">@example</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://developer.yahoo.com/social/sdk/php/</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;&nbsp;&nbsp;Copyright&nbsp;(c)&nbsp;2009&nbsp;Yahoo!&nbsp;Inc.&nbsp;All&nbsp;rights&nbsp;reserved.</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BSD&nbsp;License&nbsp;(http://www.opensource.org/licenses/bsd-license.php)</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;The&nbsp;copyrights&nbsp;embodied&nbsp;in&nbsp;the&nbsp;content&nbsp;of&nbsp;this&nbsp;file&nbsp;are&nbsp;licensed&nbsp;under&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;BSD&nbsp;(revised)&nbsp;open&nbsp;source&nbsp;license.</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;Redistribution&nbsp;and&nbsp;use&nbsp;of&nbsp;this&nbsp;software&nbsp;in&nbsp;source&nbsp;and&nbsp;binary&nbsp;forms,&nbsp;with</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;or&nbsp;without&nbsp;modification,&nbsp;are&nbsp;permitted&nbsp;provided&nbsp;that&nbsp;the&nbsp;following</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;conditions&nbsp;are&nbsp;met:</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;*&nbsp;Redistributions&nbsp;of&nbsp;source&nbsp;code&nbsp;must&nbsp;retain&nbsp;the&nbsp;above</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyright&nbsp;notice,&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;following&nbsp;disclaimer.</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;*&nbsp;Redistributions&nbsp;in&nbsp;binary&nbsp;form&nbsp;must&nbsp;reproduce&nbsp;the&nbsp;above</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;copyright&nbsp;notice,&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;following&nbsp;disclaimer&nbsp;in&nbsp;the&nbsp;documentation&nbsp;and/or&nbsp;other</span></div></li>
<li><div class="src-line"><a name="a27"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;materials&nbsp;provided&nbsp;with&nbsp;the&nbsp;distribution.</span></div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;*&nbsp;Neither&nbsp;the&nbsp;name&nbsp;of&nbsp;Yahoo!&nbsp;Inc.&nbsp;nor&nbsp;the&nbsp;names&nbsp;of&nbsp;its</span></div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contributors&nbsp;may&nbsp;be&nbsp;used&nbsp;to&nbsp;endorse&nbsp;or&nbsp;promote&nbsp;products</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;derived&nbsp;from&nbsp;this&nbsp;software&nbsp;without&nbsp;specific&nbsp;prior</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;written&nbsp;permission&nbsp;of&nbsp;Yahoo!&nbsp;Inc.</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;THIS&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;BY&nbsp;THE&nbsp;COPYRIGHT&nbsp;HOLDERS&nbsp;AND&nbsp;CONTRIBUTORS&nbsp;&quot;AS&nbsp;IS&quot;</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;AND&nbsp;ANY&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED&nbsp;WARRANTIES,&nbsp;INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO,&nbsp;THE</span></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF&nbsp;MERCHANTABILITY&nbsp;AND&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE&nbsp;ARE</span></div></li>
<li><div class="src-line"><a name="a37"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;DISCLAIMED.&nbsp;IN&nbsp;NO&nbsp;EVENT&nbsp;SHALL&nbsp;THE&nbsp;COPYRIGHT&nbsp;OWNER&nbsp;OR&nbsp;CONTRIBUTORS&nbsp;BE&nbsp;LIABLE</span></div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;FOR&nbsp;ANY&nbsp;DIRECT,&nbsp;INDIRECT,&nbsp;INCIDENTAL,&nbsp;SPECIAL,&nbsp;EXEMPLARY,&nbsp;OR&nbsp;CONSEQUENTIAL</span></div></li>
<li><div class="src-line"><a name="a39"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;DAMAGES&nbsp;(INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO,&nbsp;PROCUREMENT&nbsp;OF&nbsp;SUBSTITUTE&nbsp;GOODS&nbsp;OR</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;SERVICES;&nbsp;LOSS&nbsp;OF&nbsp;USE,&nbsp;DATA,&nbsp;OR&nbsp;PROFITS;&nbsp;OR&nbsp;BUSINESS&nbsp;INTERRUPTION)&nbsp;HOWEVER</span></div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;CAUSED&nbsp;AND&nbsp;ON&nbsp;ANY&nbsp;THEORY&nbsp;OF&nbsp;LIABILITY,&nbsp;WHETHER&nbsp;IN&nbsp;CONTRACT,&nbsp;STRICT&nbsp;LIABILITY,</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;OR&nbsp;TORT&nbsp;(INCLUDING&nbsp;NEGLIGENCE&nbsp;OR&nbsp;OTHERWISE)&nbsp;ARISING&nbsp;IN&nbsp;ANY&nbsp;WAY&nbsp;OUT&nbsp;OF&nbsp;THE&nbsp;USE</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;OF&nbsp;THIS&nbsp;SOFTWARE,&nbsp;EVEN&nbsp;IF&nbsp;ADVISED&nbsp;OF&nbsp;THE&nbsp;POSSIBILITY&nbsp;OF&nbsp;SUCH&nbsp;DAMAGE.</span></div></li>
<li><div class="src-line"><a name="a44"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;Please&nbsp;see&nbsp;the&nbsp;Yahoo!&nbsp;Developer&nbsp;Network&nbsp;forums&nbsp;for&nbsp;support:&nbsp;http://developer.yahoo.net/forum/</span></div></li>
<li><div class="src-line"><a name="a46"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a47"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;&nbsp;Documentation:&nbsp;http://developer.yahoo.com/social/sdk/php/</span></div></li>
<li><div class="src-line"><a name="a48"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a50"></a><span class="src-comm">//&nbsp;Use&nbsp;OAuthConsumer&nbsp;as&nbsp;a&nbsp;test&nbsp;to&nbsp;see&nbsp;if&nbsp;any&nbsp;other&nbsp;instances&nbsp;of&nbsp;OAuth.php&nbsp;may</span></div></li>
<li><div class="src-line"><a name="a51"></a><span class="src-comm">//&nbsp;have&nbsp;been&nbsp;included.&nbsp;require_once()&nbsp;won't&nbsp;catch&nbsp;situations&nbsp;where&nbsp;multiple</span></div></li>
<li><div class="src-line"><a name="a52"></a><span class="src-comm">//&nbsp;copies&nbsp;of&nbsp;OAuth.php&nbsp;are&nbsp;included&nbsp;by&nbsp;different&nbsp;parts&nbsp;of&nbsp;an&nbsp;application.</span></div></li>
<li><div class="src-line"><a name="a53"></a><span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/class_exists">class_exists</a><span class="src-sym">(</span><span class="src-str">&quot;OAuthConsumer&quot;</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a54"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-str">&quot;OAuth.php&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a55"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a56"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a57"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;OAUTH_PARAMS_IN_HEADERS&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;HEADERS&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a58"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;OAUTH_PARAMS_IN_POST_BODY&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;POSTBODY&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a59"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;OAUTH_SIGNATURE_PLAINTEXT&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;PLAINTEXT&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a60"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;OAUTH_SIGNATURE_HMAC_SHA1&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;HMAC_SHA1&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a62"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;YAHOO_YAP_SESSION_TYPE&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;YAHOO_YAP_SESSION_TYPE&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a63"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;YAHOO_OAUTH_RT_SESSION_TYPE&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;YAHOO_OAUTH_RT_SESSION_TYPE&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a64"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;YAHOO_OAUTH_AT_SESSION_TYPE&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;YAHOO_OAUTH_AT_SESSION_TYPE&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a66"></a><span class="src-var">$YahooConfig&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;SOCIAL_WS_HOSTNAME&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;social.yahooapis.com&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a68"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;PRESENCE_WS_HOSTNAME&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;social.yahooapis.com&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;UPDATES_WS_HOSTNAME&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;social.yahooapis.com&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;QUERY_WS_HOSTNAME&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;query.yahooapis.com&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;OAUTH_HOSTNAME&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;api.login.yahoo.com&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a72"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;YAP_WS_HOSTNAME&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;appstore.apps.yahooapis.com&quot;</span></div></li>
<li><div class="src-line"><a name="a73"></a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a75"></a><span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a77"></a><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG&nbsp;</span>=&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a78"></a><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>=&nbsp;<span class="src-str">&quot;LOG&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a80"></a><span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">,&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">,&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG</span><span class="src-sym">,&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a82"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooUtil.html">YahooUtil</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUtil.html#methodcurrent_url">current_url</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s%s&quot;</span><span class="src-sym">,</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">&quot;HTTP_HOST&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">&quot;REQUEST_URI&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a87"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUtil.html#methodverify_signature">verify_signature</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span>=<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$oauth_signature</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a88"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oauth_signature_method&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthSignatureMethod_HMAC_SHA1.html">OAuthSignatureMethod_HMAC_SHA1</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a89"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oauth_consumer&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthConsumer.html">OAuthConsumer</a></span><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a90"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oauth_token&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthToken.html">OAuthToken</a></span><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">-&gt;</span><span class="src-id">key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a91"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oauth_request&nbsp;</span>=&nbsp;<span class="src-id"><a href="../OAuth/OAuthRequest.html">OAuthRequest</a></span><span class="src-sym">::</span><a href="../OAuth/OAuthRequest.html#methodfrom_request">from_request</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a92"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a93"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ok&nbsp;</span>=&nbsp;<span class="src-var">$oauth_signature_method</span><span class="src-sym">-&gt;</span><span class="src-id">check_signature</span><span class="src-sym">(</span><span class="src-var">$oauth_request</span><span class="src-sym">,&nbsp;</span><span class="src-var">$oauth_consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$oauth_token</span><span class="src-sym">,&nbsp;</span><span class="src-var">$oauth_signature</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a94"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$ok</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUtil.html#methodis_yap_canvas">is_yap_canvas</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">'yap_appid'</span><span class="src-sym">]</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a100"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp;&nbsp;isset<span class="src-sym">(</span><span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">'yap_view'</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a101"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a104"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>!=&nbsp;<span class="src-num">200</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a105"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a106"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a107"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a108"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a109"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooException.html">YahooException</a>&nbsp;<span class="src-key">extends&nbsp;</span><span class="src-id">Exception&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a110"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a111"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a112"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a113"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a114"></a><span class="src-doc">&nbsp;*&nbsp;Logging&nbsp;wrapper&nbsp;for&nbsp;the&nbsp;Yahoo&nbsp;objects.</span></div></li>
<li><div class="src-line"><a name="a115"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a116"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@brief</span><span class="src-doc">&nbsp;Logging&nbsp;wrapper&nbsp;for&nbsp;the&nbsp;Yahoo&nbsp;objects.</span></div></li>
<li><div class="src-line"><a name="a117"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a118"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooLogger.html">YahooLogger</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a119"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a120"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Log&nbsp;a&nbsp;message&nbsp;at&nbsp;the&nbsp;debug&nbsp;level.</span></div></li>
<li><div class="src-line"><a name="a121"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a122"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$message&nbsp;</span><span class="src-doc">The&nbsp;message&nbsp;to&nbsp;log.</span></div></li>
<li><div class="src-line"><a name="a123"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a124"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">,&nbsp;</span><span class="src-var">$object&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a125"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a128"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a129"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>==&nbsp;<span class="src-str">&quot;CONSOLE&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a130"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">DEBUG&nbsp;-&nbsp;<span class="src-var">$message</span>\n</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a132"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;DEBUG&nbsp;OBJECT&nbsp;-&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;\n&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a134"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a135"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>==&nbsp;<span class="src-str">&quot;LOG&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a136"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">DEBUG&nbsp;-&nbsp;<span class="src-var">$message</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a137"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a138"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;DEBUG&nbsp;OBJECT&nbsp;-&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a141"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a142"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a143"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a145"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Log&nbsp;a&nbsp;message&nbsp;at&nbsp;the&nbsp;info&nbsp;level.</span></div></li>
<li><div class="src-line"><a name="a146"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a147"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$message&nbsp;</span><span class="src-doc">The&nbsp;message&nbsp;to&nbsp;log.</span></div></li>
<li><div class="src-line"><a name="a148"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooLogger.html#methodinfo">info</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">,&nbsp;</span><span class="src-var">$object&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a150"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a151"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>==&nbsp;<span class="src-str">&quot;CONSOLE&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a152"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">INFO&nbsp;-&nbsp;<span class="src-var">$message</span>\n</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a153"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;INFO&nbsp;OBJECT&nbsp;-&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;\n&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a155"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a156"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a157"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>==&nbsp;<span class="src-str">&quot;LOG&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">INFO&nbsp;-&nbsp;<span class="src-var">$message</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a160"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;INFO&nbsp;OBJECT&nbsp;-&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a162"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a163"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a164"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a165"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a166"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Log&nbsp;a&nbsp;message&nbsp;at&nbsp;the&nbsp;error&nbsp;level.</span></div></li>
<li><div class="src-line"><a name="a167"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a168"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$message&nbsp;</span><span class="src-doc">The&nbsp;message&nbsp;to&nbsp;log.</span></div></li>
<li><div class="src-line"><a name="a169"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">,&nbsp;</span><span class="src-var">$object&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a172"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>==&nbsp;<span class="src-str">&quot;CONSOLE&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a173"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">ERROR&nbsp;-&nbsp;<span class="src-var">$message</span>\n</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a174"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a175"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;ERROR&nbsp;OBJECT&nbsp;-&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;\n&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a176"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a178"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>==&nbsp;<span class="src-str">&quot;LOG&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a179"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">ERROR&nbsp;-&nbsp;<span class="src-var">$message</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a180"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a181"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;ERROR&nbsp;OBJECT&nbsp;-&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/print_r">print_r</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a182"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a183"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a187"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Enables/disables&nbsp;session&nbsp;debugging.</span></div></li>
<li><div class="src-line"><a name="a188"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a189"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$debug&nbsp;</span><span class="src-doc">Boolean&nbsp;to&nbsp;enable/disable&nbsp;debugging.</span></div></li>
<li><div class="src-line"><a name="a190"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooLogger.html#methodsetDebug">setDebug</a><span class="src-sym">(</span><span class="src-var">$debug</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a192"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a193"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG&nbsp;</span>=&nbsp;(bool)&nbsp;<span class="src-var">$debug</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a194"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a195"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a196"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a197"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Allows&nbsp;callers&nbsp;to&nbsp;configure&nbsp;where&nbsp;debugging&nbsp;output&nbsp;is&nbsp;sent.</span></div></li>
<li><div class="src-line"><a name="a198"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a199"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$destination&nbsp;</span><span class="src-doc">&quot;LOG&quot;&nbsp;to&nbsp;use&nbsp;YahooLogger::error,&nbsp;&quot;CONSOLE&quot;&nbsp;to&nbsp;use&nbsp;printf,</span></div></li>
<li><div class="src-line"><a name="a200"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;NULL&quot;&nbsp;to&nbsp;disable&nbsp;all&nbsp;logging&nbsp;output.</span></div></li>
<li><div class="src-line"><a name="a201"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">True&nbsp;on&nbsp;success,&nbsp;false&nbsp;on&nbsp;failure.</span></div></li>
<li><div class="src-line"><a name="a202"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a203"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooLogger.html#methodsetDebugDestination">setDebugDestination</a><span class="src-sym">(</span><span class="src-var">$destination</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a204"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a205"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$destination&nbsp;</span>==&nbsp;<span class="src-str">&quot;LOG&quot;&nbsp;</span>||&nbsp;<span class="src-var">$destination&nbsp;</span>==&nbsp;<span class="src-str">&quot;CONSOLE&quot;&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a206"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$destination&nbsp;</span>==&nbsp;<span class="src-str">&quot;NULL&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a207"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_LOGGER_DEBUG_DESTINATION&nbsp;</span>=&nbsp;<span class="src-var">$destination</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a208"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a209"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a210"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a214"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a217"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a218"></a><span class="src-doc">&nbsp;*&nbsp;Defines&nbsp;a&nbsp;session&nbsp;between&nbsp;an&nbsp;application&nbsp;and&nbsp;the&nbsp;Yahoo!&nbsp;platform.</span></div></li>
<li><div class="src-line"><a name="a219"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a220"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@brief</span><span class="src-doc">&nbsp;Defines&nbsp;a&nbsp;session&nbsp;between&nbsp;an&nbsp;application&nbsp;and&nbsp;the&nbsp;Yahoo!&nbsp;platform.</span></div></li>
<li><div class="src-line"><a name="a221"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a222"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooSession.html">YahooSession</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a223"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a224"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a225"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a226"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooSession.html#var$guid">$guid</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a227"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a228"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a229"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a230"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a231"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooSession.html#var$consumer">$consumer</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a232"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a233"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a234"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a235"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a236"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooSession.html#var$accessToken">$accessToken</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a237"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a238"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a239"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a240"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a241"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooSession.html#var$applicationId">$applicationId</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a242"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a244"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a245"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooSession.html#var$client">$client</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a248"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a249"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a250"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a251"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooSession.html#var$application">$application</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a252"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a253"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a254"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a255"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accessToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a257"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a258"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$consumer">consumer</a>&nbsp;=&nbsp;<span class="src-var">$consumer</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$accessToken">accessToken</a>&nbsp;=&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$applicationId">applicationId</a>&nbsp;=&nbsp;<span class="src-var">$applicationId</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a261"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$guid">guid</a>&nbsp;=&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">guid</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a263"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$client">client</a>&nbsp;=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/OAuthClient.html">OAuthClient</a></span><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accessToken</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a264"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a265"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$application">application</a>&nbsp;=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/YahooApplication.html">YahooApplication</a></span><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a266"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$application">application</a><span class="src-sym">-&gt;</span><span class="src-id">token&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$accessToken">accessToken</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a267"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a268"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a269"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a270"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a271"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodgetConsumer">getConsumer</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$consumer">consumer</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a277"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a278"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodgetAccessToken">getAccessToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$accessToken">accessToken</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a283"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a284"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a285"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a286"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodgetApplicationId">getApplicationId</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a287"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$applicationId">applicationId</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a288"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a290"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a291"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;currently&nbsp;sessioned&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a292"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a293"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">YahooUser&nbsp;</span><span class="src-doc">The&nbsp;currently&nbsp;sessioned&nbsp;YahooUser.</span></div></li>
<li><div class="src-line"><a name="a294"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a295"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodgetSessionedUser">getSessionedUser</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a296"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/YahooUser.html">YahooUser</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$guid">guid</a><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a297"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a298"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a299"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a300"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;user&nbsp;who&nbsp;owns&nbsp;the&nbsp;application&nbsp;install.</span></div></li>
<li><div class="src-line"><a name="a301"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Only&nbsp;valid&nbsp;when&nbsp;viewed&nbsp;in&nbsp;YAP,&nbsp;otherwise&nbsp;will&nbsp;default</span></div></li>
<li><div class="src-line"><a name="a302"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;to&nbsp;the&nbsp;logged-in&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a303"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a304"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">YahooUser&nbsp;</span><span class="src-doc">The&nbsp;currently&nbsp;sessioned&nbsp;YahooUser.</span></div></li>
<li><div class="src-line"><a name="a305"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a306"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodgetOwner">getOwner</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a307"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$accessToken">accessToken</a><span class="src-sym">-&gt;</span><span class="src-id">owner</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a308"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#methodgetUser">getUser</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$accessToken">accessToken</a><span class="src-sym">-&gt;</span><span class="src-id">owner</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a309"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a310"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a311"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#methodgetSessionedUser">getSessionedUser</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a312"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a313"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a314"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a315"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a316"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;user&nbsp;indicated&nbsp;by&nbsp;the&nbsp;GUID&nbsp;given.</span></div></li>
<li><div class="src-line"><a name="a317"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a318"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$guid&nbsp;</span><span class="src-doc">The&nbsp;GUID&nbsp;of&nbsp;the&nbsp;user&nbsp;to&nbsp;get.</span></div></li>
<li><div class="src-line"><a name="a319"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">YahooUser&nbsp;</span><span class="src-doc">The&nbsp;user&nbsp;indicated&nbsp;by&nbsp;the&nbsp;GUID&nbsp;given.</span></div></li>
<li><div class="src-line"><a name="a320"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a321"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodgetUser">getUser</a><span class="src-sym">(</span><span class="src-var">$guid</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a322"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/YahooUser.html">YahooUser</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">,&nbsp;</span><span class="src-var">$guid</span><span class="src-sym">,&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$guid">guid</a><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><span class="src-var">$guid&nbsp;</span>==&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$guid">guid</a><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a324"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a325"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a326"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Executes&nbsp;the&nbsp;given&nbsp;YQL&nbsp;query.</span></div></li>
<li><div class="src-line"><a name="a327"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a328"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$yql&nbsp;</span><span class="src-doc">The&nbsp;query&nbsp;to&nbsp;execute.</span></div></li>
<li><div class="src-line"><a name="a329"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$env&nbsp;</span><span class="src-doc">A&nbsp;URL&nbsp;to&nbsp;a&nbsp;YQL&nbsp;environment&nbsp;file.</span></div></li>
<li><div class="src-line"><a name="a330"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">response&nbsp;or&nbsp;NULL&nbsp;if&nbsp;the&nbsp;request&nbsp;fails..</span></div></li>
<li><div class="src-line"><a name="a331"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a332"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodquery">query</a><span class="src-sym">(</span><span class="src-var">$yql</span><span class="src-sym">,&nbsp;</span><span class="src-var">$env</span>=<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a333"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooSession.html#var$application">application</a><span class="src-sym">-&gt;</span><span class="src-id">query</span><span class="src-sym">(</span><span class="src-var">$yql</span><span class="src-sym">,&nbsp;</span><span class="src-var">$env</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a334"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a335"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a336"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a337"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a338"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a339"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodredirectForAuthorization">redirectForAuthorization</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a340"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$url&nbsp;</span>=&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodcreateAuthorizationUrl">createAuthorizationUrl</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a341"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a342"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a343"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/header">header</a><span class="src-sym">(</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;Location:&nbsp;%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$url</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a344"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">exit</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a345"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a346"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a347"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;throw&nbsp;a&nbsp;YahooException</span></div></li>
<li><div class="src-line"><a name="a348"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Failed&nbsp;to&nbsp;create&nbsp;authorization&nbsp;URLs&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a349"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a350"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a351"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a352"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a353"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Destroys&nbsp;the&nbsp;current&nbsp;session,&nbsp;effectively&nbsp;logging&nbsp;out&nbsp;the&nbsp;current</span></div></li>
<li><div class="src-line"><a name="a354"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a355"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a356"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$sessionStore&nbsp;</span><span class="src-doc">The&nbsp;session&nbsp;store&nbsp;implementation&nbsp;to&nbsp;clear.&nbsp;See</span></div></li>
<li><div class="src-line"><a name="a357"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YahooSessionStore&nbsp;for&nbsp;more&nbsp;information.&nbsp;If&nbsp;no</span></div></li>
<li><div class="src-line"><a name="a358"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session&nbsp;store&nbsp;is&nbsp;provided,&nbsp;clearSession&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a359"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;instantiate&nbsp;a&nbsp;NativeSessionStore&nbsp;and&nbsp;use&nbsp;that.</span></div></li>
<li><div class="src-line"><a name="a360"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a361"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodclearSession">clearSession</a><span class="src-sym">(</span><span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a362"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a363"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a364"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$sessionStore</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a365"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/NativeSessionStore.html">NativeSessionStore</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a366"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a367"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a368"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">clearRequestToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a369"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">clearAccessToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a370"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a371"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a372"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a373"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a374"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a375"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Checks&nbsp;to&nbsp;see&nbsp;if&nbsp;there&nbsp;is&nbsp;a&nbsp;session&nbsp;in&nbsp;this&nbsp;PHP&nbsp;page&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a376"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Doesn't&nbsp;cause&nbsp;any&nbsp;redirects&nbsp;for&nbsp;the&nbsp;user&nbsp;to&nbsp;log&nbsp;in,&nbsp;for&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a377"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;you&nbsp;should&nbsp;call&nbsp;requireSession().</span></div></li>
<li><div class="src-line"><a name="a378"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a379"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerKey&nbsp;</span><span class="src-doc">The&nbsp;OAuth&nbsp;consumer&nbsp;key.</span></div></li>
<li><div class="src-line"><a name="a380"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerSecret&nbsp;</span><span class="src-doc">The&nbsp;OAuth&nbsp;consumer&nbsp;key&nbsp;secret.</span></div></li>
<li><div class="src-line"><a name="a381"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$applicationId&nbsp;</span><span class="src-doc">The&nbsp;application&nbsp;ID,&nbsp;optional.</span></div></li>
<li><div class="src-line"><a name="a382"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$sessionStore&nbsp;</span><span class="src-doc">The&nbsp;session&nbsp;store&nbsp;implementation&nbsp;to&nbsp;use.&nbsp;See</span></div></li>
<li><div class="src-line"><a name="a383"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YahooSessionStore&nbsp;for&nbsp;more&nbsp;information.&nbsp;If&nbsp;no</span></div></li>
<li><div class="src-line"><a name="a384"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session&nbsp;store&nbsp;is&nbsp;provided,&nbsp;clearSession&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a385"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;instantiate&nbsp;a&nbsp;NativeSessionStore&nbsp;and&nbsp;use&nbsp;that.</span></div></li>
<li><div class="src-line"><a name="a386"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">True&nbsp;if&nbsp;a&nbsp;session&nbsp;is&nbsp;present,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a387"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a388"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodhasSession">hasSession</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a389"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a390"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$sessionStore</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a391"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/NativeSessionStore.html">NativeSessionStore</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a392"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a393"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a394"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$verifier</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;oauth_verifier&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_GET</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a395"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$verifier&nbsp;</span>=&nbsp;<span class="src-var">$_GET</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_verifier&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a396"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a397"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a398"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$session&nbsp;</span>=&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodinitSession">initSession</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">,&nbsp;</span><span class="src-id">FALSE</span><span class="src-sym">,&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a399"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$session</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a400"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a401"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a402"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a403"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Requires&nbsp;that&nbsp;there&nbsp;be&nbsp;a&nbsp;session&nbsp;in&nbsp;this&nbsp;PHP&nbsp;page&nbsp;request.&nbsp;Generates</span></div></li>
<li><div class="src-line"><a name="a404"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;a&nbsp;redirect&nbsp;for&nbsp;the&nbsp;user&nbsp;to&nbsp;log&nbsp;in,&nbsp;if&nbsp;necessary.&nbsp;You&nbsp;must&nbsp;call</span></div></li>
<li><div class="src-line"><a name="a405"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;requireSession()&nbsp;before&nbsp;any&nbsp;data&nbsp;is&nbsp;sent&nbsp;back&nbsp;to&nbsp;the&nbsp;user&nbsp;in&nbsp;order</span></div></li>
<li><div class="src-line"><a name="a406"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;for&nbsp;the&nbsp;redirect&nbsp;to&nbsp;work.</span></div></li>
<li><div class="src-line"><a name="a407"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a408"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerKey&nbsp;</span><span class="src-doc">The&nbsp;OAuth&nbsp;consumer&nbsp;key.</span></div></li>
<li><div class="src-line"><a name="a409"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerSecret&nbsp;</span><span class="src-doc">The&nbsp;OAuth&nbsp;consumer&nbsp;key&nbsp;secret.</span></div></li>
<li><div class="src-line"><a name="a410"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$applicationId&nbsp;</span><span class="src-doc">The&nbsp;application&nbsp;ID,&nbsp;optional.</span></div></li>
<li><div class="src-line"><a name="a411"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$callback&nbsp;</span><span class="src-doc">The&nbsp;callback&nbsp;URL&nbsp;to&nbsp;redirect&nbsp;the&nbsp;user&nbsp;to&nbsp;after</span></div></li>
<li><div class="src-line"><a name="a412"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;they&nbsp;verify&nbsp;the&nbsp;application&nbsp;access.&nbsp;If&nbsp;no&nbsp;callback</span></div></li>
<li><div class="src-line"><a name="a413"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is&nbsp;provided,&nbsp;the&nbsp;current&nbsp;page&nbsp;URL&nbsp;will&nbsp;be&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a414"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$sessionStore&nbsp;</span><span class="src-doc">The&nbsp;session&nbsp;store&nbsp;implementation&nbsp;to&nbsp;use.&nbsp;See</span></div></li>
<li><div class="src-line"><a name="a415"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YahooSessionStore&nbsp;for&nbsp;more&nbsp;information.&nbsp;If&nbsp;no</span></div></li>
<li><div class="src-line"><a name="a416"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session&nbsp;store&nbsp;is&nbsp;provided,&nbsp;clearSession&nbsp;will</span></div></li>
<li><div class="src-line"><a name="a417"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;instantiate&nbsp;a&nbsp;NativeSessionStore&nbsp;and&nbsp;use&nbsp;that.</span></div></li>
<li><div class="src-line"><a name="a418"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$verifier&nbsp;</span><span class="src-doc">The&nbsp;oauth_verifier&nbsp;returned&nbsp;by&nbsp;the&nbsp;OAuth&nbsp;servers</span></div></li>
<li><div class="src-line"><a name="a419"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;after&nbsp;authorization.&nbsp;Passing&nbsp;NULL&nbsp;indicates&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a420"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;authorization&nbsp;was&nbsp;completed&nbsp;previously&nbsp;or&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a421"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requireSession()&nbsp;should&nbsp;look&nbsp;for&nbsp;oauth_verifier&nbsp;in</span></div></li>
<li><div class="src-line"><a name="a422"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;$_GET&nbsp;superglobal.</span></div></li>
<li><div class="src-line"><a name="a423"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">YahooSession&nbsp;</span><span class="src-doc">The&nbsp;current&nbsp;session&nbsp;or&nbsp;NULL&nbsp;if&nbsp;a&nbsp;session&nbsp;cannot</span></div></li>
<li><div class="src-line"><a name="a424"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;established.</span></div></li>
<li><div class="src-line"><a name="a425"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a426"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodrequireSession">requireSession</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a427"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$callback&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a428"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a429"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$sessionStore</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a430"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/NativeSessionStore.html">NativeSessionStore</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a431"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a432"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a433"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$verifier</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;oauth_verifier&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_GET</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a434"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$verifier&nbsp;</span>=&nbsp;<span class="src-var">$_GET</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_verifier&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a435"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a436"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a437"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodinitSession">initSession</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">,&nbsp;</span><span class="src-id">TRUE</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a438"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a439"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a440"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a441"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Creates&nbsp;authorization&nbsp;URLs,&nbsp;allowing&nbsp;applications&nbsp;to&nbsp;manage&nbsp;their</span></div></li>
<li><div class="src-line"><a name="a442"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;user&nbsp;experience&nbsp;when&nbsp;the&nbsp;user&nbsp;needs&nbsp;to&nbsp;be&nbsp;sent&nbsp;to&nbsp;Yahoo!&nbsp;to&nbsp;authorize</span></div></li>
<li><div class="src-line"><a name="a443"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;application&nbsp;to&nbsp;access&nbsp;their&nbsp;account.</span></div></li>
<li><div class="src-line"><a name="a444"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a445"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerKey&nbsp;</span><span class="src-doc">The&nbsp;OAuth&nbsp;consumer&nbsp;key.</span></div></li>
<li><div class="src-line"><a name="a446"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerSecret&nbsp;</span><span class="src-doc">The&nbsp;OAuth&nbsp;consumer&nbsp;key&nbsp;secret.</span></div></li>
<li><div class="src-line"><a name="a447"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$callback&nbsp;</span><span class="src-doc">The&nbsp;callback&nbsp;URL&nbsp;to&nbsp;redirect&nbsp;the&nbsp;user&nbsp;to&nbsp;after</span></div></li>
<li><div class="src-line"><a name="a448"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;they&nbsp;verify&nbsp;the&nbsp;application&nbsp;access.&nbsp;If&nbsp;no&nbsp;callback</span></div></li>
<li><div class="src-line"><a name="a449"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is&nbsp;provided,&nbsp;the&nbsp;current&nbsp;page&nbsp;URL&nbsp;will&nbsp;be&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a450"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use&nbsp;the&nbsp;&quot;oob&quot;&nbsp;callback&nbsp;for&nbsp;desktop&nbsp;clients&nbsp;or&nbsp;for</span></div></li>
<li><div class="src-line"><a name="a451"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web&nbsp;clients&nbsp;where&nbsp;no&nbsp;callback&nbsp;should&nbsp;be&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a452"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$sessionStore&nbsp;</span><span class="src-doc">The&nbsp;session&nbsp;store&nbsp;implementation&nbsp;to&nbsp;use.&nbsp;See</span></div></li>
<li><div class="src-line"><a name="a453"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YahooSessionStore&nbsp;for&nbsp;more&nbsp;information.&nbsp;If&nbsp;no</span></div></li>
<li><div class="src-line"><a name="a454"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session&nbsp;store&nbsp;is&nbsp;provided,&nbsp;createAuthorizationUrl</span></div></li>
<li><div class="src-line"><a name="a455"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;instantiate&nbsp;a&nbsp;NativeSessionStore&nbsp;and&nbsp;use&nbsp;that.</span></div></li>
<li><div class="src-line"><a name="a456"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">stdclass&nbsp;</span><span class="src-doc">A&nbsp;PHP&nbsp;object&nbsp;with&nbsp;two&nbsp;properties:&nbsp;&quot;urlWithCallback&quot;</span></div></li>
<li><div class="src-line"><a name="a457"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;&quot;urlWithoutCallback&quot;.&nbsp;This&nbsp;allows&nbsp;the&nbsp;application</span></div></li>
<li><div class="src-line"><a name="a458"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;mix&nbsp;and&nbsp;match&nbsp;authorizations&nbsp;that&nbsp;do&nbsp;and&nbsp;don't</span></div></li>
<li><div class="src-line"><a name="a459"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;have&nbsp;callbacks&nbsp;in&nbsp;the&nbsp;URLs.&nbsp;urlWithoutCallback&nbsp;is</span></div></li>
<li><div class="src-line"><a name="a460"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;useful&nbsp;for&nbsp;JavaScript&nbsp;popup&nbsp;windows&nbsp;while</span></div></li>
<li><div class="src-line"><a name="a461"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;urlWithCallback&nbsp;is&nbsp;useful&nbsp;for&nbsp;normal&nbsp;&lt;a&nbsp;href&gt;</span></div></li>
<li><div class="src-line"><a name="a462"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tags.</span></div></li>
<li><div class="src-line"><a name="a463"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a464"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodcreateAuthorizationUrl">createAuthorizationUrl</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a465"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a466"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a467"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a468"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$sessionStore</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a469"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/NativeSessionStore.html">NativeSessionStore</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a470"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a471"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a472"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;No&nbsp;callback&nbsp;URL&nbsp;supplied.&nbsp;Build&nbsp;one&nbsp;from&nbsp;the&nbsp;current&nbsp;URL.</span></div></li>
<li><div class="src-line"><a name="a473"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$callback</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a474"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$callback&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodcurrent_url">current_url</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a475"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a476"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a477"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Redirect&nbsp;the&nbsp;user&nbsp;to&nbsp;log&nbsp;in.</span></div></li>
<li><div class="src-line"><a name="a478"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestToken&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooAuthorization.html">YahooAuthorization</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooAuthorization.html#methodgetRequestToken">getRequestToken</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a479"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a480"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a481"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a482"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">storeRequestToken</span><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a483"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a484"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$url&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooAuthorization.html">YahooAuthorization</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooAuthorization.html#methodcreateAuthorizationUrl">createAuthorizationUrl</a><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a485"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$url</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a486"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a487"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a488"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a489"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Failed&nbsp;to&nbsp;create&nbsp;request&nbsp;token&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a490"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a491"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">null</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a492"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a493"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a494"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a495"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodinitSessionFromYAP">initSessionFromYAP</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$appid</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a496"></a>&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a497"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a498"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a499"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_yap_canvas">is_yap_canvas</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a500"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;throw&nbsp;a&nbsp;YahooException</span></div></li>
<li><div class="src-line"><a name="a501"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a502"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a503"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a504"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a505"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>=&nbsp;<span class="src-var">$consumerKey</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a506"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">secret&nbsp;</span>=&nbsp;<span class="src-var">$consumerSecret</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a507"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a508"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>!=&nbsp;<span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">&quot;yap_consumer_key&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a509"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Consumer&nbsp;key&nbsp;from&nbsp;YAP&nbsp;does&nbsp;not&nbsp;match&nbsp;provided&nbsp;key.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a510"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;throw&nbsp;a&nbsp;YahooException</span></div></li>
<li><div class="src-line"><a name="a511"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a512"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a513"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a514"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a515"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$signature_ok&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodverify_signature">verify_signature</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_REQUEST</span><span class="src-sym">[</span><span class="src-str">'oauth_signature'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a516"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a517"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$signature_ok</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a518"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a519"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Signature&nbsp;from&nbsp;YAP&nbsp;failed.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a520"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;throw&nbsp;a&nbsp;YahooException</span></div></li>
<li><div class="src-line"><a name="a521"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a522"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a523"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a524"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a525"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a526"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>=&nbsp;<span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">&quot;yap_viewer_access_token&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a527"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">secret&nbsp;</span>=&nbsp;<span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">&quot;yap_viewer_access_token_secret&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a528"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">guid&nbsp;</span>=&nbsp;<span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">&quot;yap_viewer_guid&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a529"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">owner&nbsp;</span>=&nbsp;<span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">&quot;yap_owner_guid&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a530"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">tokenExpires&nbsp;</span>=&nbsp;-<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a531"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a532"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-str">&quot;YAP&nbsp;AT:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;ATS:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a533"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a534"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$applicationId&nbsp;</span>=&nbsp;<span class="src-var">$_POST</span><span class="src-sym">[</span><span class="src-str">&quot;yap_appid&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a535"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accessToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a536"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a537"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a538"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a539"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a540"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a541"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a542"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a543"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodinitSession">initSession</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">,&nbsp;</span><span class="src-var">$redirect</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a544"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a545"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a546"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a547"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a548"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a549"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a550"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a551"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a552"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>=&nbsp;<span class="src-var">$consumerKey</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a553"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">secret&nbsp;</span>=&nbsp;<span class="src-var">$consumerSecret</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a554"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a555"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$checkSession&nbsp;</span>=&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodcheckSession">checkSession</a><span class="src-sym">(</span><span class="src-var">$type</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a556"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a557"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$checkSession</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a558"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;There&nbsp;doesn't&nbsp;appear&nbsp;to&nbsp;be&nbsp;a&nbsp;session&nbsp;here.</span></div></li>
<li><div class="src-line"><a name="a559"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$redirect</span><span class="src-sym">)&nbsp;&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a560"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a561"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodredirectForAuthorization">redirectForAuthorization</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a562"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a563"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a564"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Don't&nbsp;redirect&nbsp;the&nbsp;user,&nbsp;just&nbsp;inform&nbsp;the&nbsp;caller&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a565"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;no&nbsp;session&nbsp;is&nbsp;present.</span></div></li>
<li><div class="src-line"><a name="a566"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;throw&nbsp;a&nbsp;YahooException</span></div></li>
<li><div class="src-line"><a name="a567"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a568"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a569"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a570"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$type&nbsp;</span>==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineYAHOO_OAUTH_AT_SESSION_TYPE">YAHOO_OAUTH_AT_SESSION_TYPE</a></span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a571"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Found&nbsp;an&nbsp;OAuth&nbsp;Access&nbsp;Token&nbsp;session.</span></div></li>
<li><div class="src-line"><a name="a572"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken&nbsp;</span>=&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">fetchAccessToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a573"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$now&nbsp;</span>=&nbsp;<a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a574"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a575"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-str">&quot;OAuth&nbsp;AT:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;&nbsp;&nbsp;ATS:&nbsp;&quot;</span>.&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a576"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a577"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">consumer&nbsp;</span>!=&nbsp;<span class="src-var">$consumerKey</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a578"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a579"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Consumer&nbsp;key&nbsp;for&nbsp;token&nbsp;does&nbsp;not&nbsp;match&nbsp;the&nbsp;defined&nbsp;Consumer&nbsp;Key.&nbsp;The&nbsp;Consumer&nbsp;Key&nbsp;has&nbsp;probably&nbsp;changed&nbsp;since&nbsp;the&nbsp;user&nbsp;last&nbsp;authorized&nbsp;the&nbsp;application.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a580"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodclearSession">clearSession</a><span class="src-sym">(</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a581"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a582"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$redirect</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a583"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodredirectForAuthorization">redirectForAuthorization</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a584"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a585"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a586"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a587"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">tokenExpires&nbsp;</span>&gt;=&nbsp;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a588"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-str">'AT&nbsp;Expires&nbsp;in:&nbsp;'&nbsp;</span>.&nbsp;<span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">tokenExpires&nbsp;</span>-&nbsp;<span class="src-var">$now</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a589"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a590"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a591"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">((</span><span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">tokenExpires&nbsp;</span>&gt;=&nbsp;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">tokenExpires&nbsp;</span>-&nbsp;<span class="src-var">$now</span><span class="src-sym">)&nbsp;</span>&lt;&nbsp;<span class="src-num">30</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a592"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;The&nbsp;access&nbsp;token&nbsp;will&nbsp;expire&nbsp;in&nbsp;less&nbsp;than&nbsp;30&nbsp;seconds&nbsp;or</span></div></li>
<li><div class="src-line"><a name="a593"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;it&nbsp;may&nbsp;have&nbsp;expired&nbsp;already.&nbsp;Try&nbsp;to&nbsp;get&nbsp;a&nbsp;new&nbsp;one.</span></div></li>
<li><div class="src-line"><a name="a594"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodaccessTokenExpired">accessTokenExpired</a><span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a595"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a596"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a597"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;The&nbsp;access&nbsp;token&nbsp;is&nbsp;still&nbsp;good&nbsp;for&nbsp;a&nbsp;little&nbsp;while,&nbsp;continue&nbsp;using&nbsp;it.</span></div></li>
<li><div class="src-line"><a name="a598"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accessToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a599"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a600"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a601"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$type&nbsp;</span>==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineYAHOO_OAUTH_RT_SESSION_TYPE">YAHOO_OAUTH_RT_SESSION_TYPE</a></span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a602"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a603"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$verifier</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a604"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Can't&nbsp;proceed&nbsp;without&nbsp;the&nbsp;oauth_verifier,&nbsp;treat&nbsp;it&nbsp;as</span></div></li>
<li><div class="src-line"><a name="a605"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;though&nbsp;there's&nbsp;no&nbsp;session&nbsp;present.</span></div></li>
<li><div class="src-line"><a name="a606"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">clearRequestToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a607"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a608"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;throw&nbsp;a&nbsp;YahooException</span></div></li>
<li><div class="src-line"><a name="a609"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a610"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a611"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a612"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Found&nbsp;an&nbsp;OAuth&nbsp;Request&nbsp;Token&nbsp;session.</span></div></li>
<li><div class="src-line"><a name="a613"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestToken&nbsp;</span>=&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">fetchRequestToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a614"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a615"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooAuthorization.html">YahooAuthorization</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooAuthorization.html#methodgetAccessToken">getAccessToken</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a616"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a617"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a618"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">storeAccessToken</span><span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a619"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">clearRequestToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a620"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a621"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accessToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a622"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a623"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$redirect</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a624"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a625"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;Add&nbsp;redirect&nbsp;counter&nbsp;so&nbsp;this&nbsp;doesn't&nbsp;happen&nbsp;over&nbsp;and&nbsp;over&nbsp;and&nbsp;over&nbsp;when&nbsp;Yahoo!&nbsp;is&nbsp;completely&nbsp;busted.</span></div></li>
<li><div class="src-line"><a name="a626"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;The&nbsp;fetch&nbsp;for&nbsp;the&nbsp;access&nbsp;token&nbsp;failed.&nbsp;Generate&nbsp;a&nbsp;new</span></div></li>
<li><div class="src-line"><a name="a627"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;request&nbsp;token&nbsp;and&nbsp;try&nbsp;again.</span></div></li>
<li><div class="src-line"><a name="a628"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a629"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodredirectForAuthorization">redirectForAuthorization</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a630"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a631"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a632"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a633"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Don't&nbsp;redirect&nbsp;the&nbsp;user,&nbsp;just&nbsp;inform&nbsp;the&nbsp;caller&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a634"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;no&nbsp;session&nbsp;is&nbsp;present.</span></div></li>
<li><div class="src-line"><a name="a635"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">clearRequestToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a636"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a637"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a638"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a639"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$type&nbsp;</span>==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineYAHOO_YAP_SESSION_TYPE">YAHOO_YAP_SESSION_TYPE</a></span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a640"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a641"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Found&nbsp;a&nbsp;YAP&nbsp;session.</span></div></li>
<li><div class="src-line"><a name="a642"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodinitSessionFromYAP">initSessionFromYAP</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a643"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a644"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a645"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a646"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Unknown&nbsp;session&nbsp;type&nbsp;found&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a647"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;TODO:&nbsp;throw&nbsp;a&nbsp;YahooException</span></div></li>
<li><div class="src-line"><a name="a648"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a649"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a650"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a651"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a652"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a653"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a654"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a655"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a656"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a657"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodaccessTokenExpired">accessTokenExpired</a><span class="src-sym">(</span><span class="src-var">$accessToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a658"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a659"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$GLOBAL_YAHOO_SESSION</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a660"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a661"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$now&nbsp;</span>=&nbsp;<a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a662"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">((</span><span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">handleExpires&nbsp;</span>===&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a663"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-var">$now&nbsp;</span>&lt;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">handleExpires</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a664"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Either&nbsp;the&nbsp;access&nbsp;session&nbsp;handle&nbsp;doesn't&nbsp;expire</span></div></li>
<li><div class="src-line"><a name="a665"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;or&nbsp;it&nbsp;hasn't&nbsp;expired&nbsp;yet.&nbsp;Get&nbsp;a&nbsp;new&nbsp;access&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a666"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$newAccessToken&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooAuthorization.html">YahooAuthorization</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooAuthorization.html#methodgetAccessToken">getAccessToken</a><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a667"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$accessToken</span><span class="src-sym">,&nbsp;</span><span class="src-id">null</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a668"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$newAccessToken</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a669"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Failed&nbsp;to&nbsp;fetch&nbsp;access&nbsp;token&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a670"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a671"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a672"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a673"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">storeAccessToken</span><span class="src-sym">(</span><span class="src-var">$newAccessToken</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a674"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a675"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-str">&quot;Got&nbsp;new&nbsp;AT/ATS&nbsp;from&nbsp;ASH!&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a676"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-str">&quot;OAuth&nbsp;AT:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$newAccessToken</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;&nbsp;&nbsp;ATS:&nbsp;&quot;</span>.&nbsp;<span class="src-var">$newAccessToken</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a677"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a678"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a679"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$newAccessToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$applicationId</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a680"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a681"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a682"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a683"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;The&nbsp;access&nbsp;token&nbsp;is&nbsp;expired&nbsp;and&nbsp;we&nbsp;don't&nbsp;have</span></div></li>
<li><div class="src-line"><a name="a684"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;a&nbsp;sufficient&nbsp;access&nbsp;session&nbsp;handle&nbsp;to&nbsp;renew</span></div></li>
<li><div class="src-line"><a name="a685"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;access&nbsp;token.&nbsp;Clear&nbsp;the&nbsp;cookie&nbsp;and&nbsp;redirect</span></div></li>
<li><div class="src-line"><a name="a686"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;to&nbsp;authorization&nbsp;point&nbsp;or&nbsp;return&nbsp;a&nbsp;NULL&nbsp;session.</span></div></li>
<li><div class="src-line"><a name="a687"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">clearAccessToken</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a688"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a689"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$redirect</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a690"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../yos-social-php/YahooSession.html#methodYahooSession">YahooSession</a><span class="src-sym">::</span><a href="../yos-social-php/YahooSession.html#methodredirectForAuthorization">redirectForAuthorization</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">key</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumer</span><span class="src-sym">-&gt;</span><span class="src-id">secret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a691"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a692"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$GLOBAL_YAHOO_SESSION&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a693"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a694"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a695"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a696"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a697"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a698"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a699"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a700"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;Checks&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;current&nbsp;PHP&nbsp;page&nbsp;request&nbsp;has&nbsp;a&nbsp;session&nbsp;and,&nbsp;if&nbsp;so,</span></div></li>
<li><div class="src-line"><a name="a701"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;indicates&nbsp;what&nbsp;type&nbsp;of&nbsp;session&nbsp;is&nbsp;present.</span></div></li>
<li><div class="src-line"><a name="a702"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a703"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@param[out]</span><span class="src-doc">&nbsp;$sessionType&nbsp;The&nbsp;session&nbsp;type&nbsp;present,&nbsp;if&nbsp;any.</span></div></li>
<li><div class="src-line"><a name="a704"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">True&nbsp;if&nbsp;a&nbsp;session&nbsp;is&nbsp;present,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a705"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a706"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooSession.html#methodcheckSession">checkSession</a><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$sessionType</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessionStore</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a707"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;yap_appid&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_POST</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a708"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionType&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineYAHOO_YAP_SESSION_TYPE">YAHOO_YAP_SESSION_TYPE</a></span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a709"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a710"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a711"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">hasAccessToken</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a712"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionType&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineYAHOO_OAUTH_AT_SESSION_TYPE">YAHOO_OAUTH_AT_SESSION_TYPE</a></span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a713"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a714"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a715"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$sessionStore</span><span class="src-sym">-&gt;</span><span class="src-id">hasRequestToken</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a716"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sessionType&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineYAHOO_OAUTH_RT_SESSION_TYPE">YAHOO_OAUTH_RT_SESSION_TYPE</a></span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a717"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a718"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a719"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a720"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a721"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a722"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a723"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a724"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a725"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a726"></a><span class="src-doc">&nbsp;*&nbsp;Represents&nbsp;a&nbsp;Yahoo!&nbsp;application.</span></div></li>
<li><div class="src-line"><a name="a727"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a728"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@brief</span><span class="src-doc">&nbsp;Represents&nbsp;a&nbsp;Yahoo!&nbsp;application.</span></div></li>
<li><div class="src-line"><a name="a729"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a730"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooApplication.html">YahooApplication</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a731"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a732"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a733"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a734"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooApplication.html#var$consumer">$consumer</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a735"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a736"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a737"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a738"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span></div></li>
<li><div class="src-line"><a name="a739"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a740"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooApplication.html#var$client">$client</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a741"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a742"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a743"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a744"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a745"></a>&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooApplication.html#var$token">$token</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a746"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a747"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a748"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Constructs&nbsp;a&nbsp;new&nbsp;YahooApplication&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a749"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a750"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerKey&nbsp;</span><span class="src-doc">The&nbsp;consumer&nbsp;key&nbsp;of&nbsp;the&nbsp;application.</span></div></li>
<li><div class="src-line"><a name="a751"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumerKeySecret&nbsp;</span><span class="src-doc">The&nbsp;consumer&nbsp;key&nbsp;secret&nbsp;of&nbsp;the&nbsp;application.</span></div></li>
<li><div class="src-line"><a name="a752"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a753"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooApplication.html#methodYahooApplication">YahooApplication</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerKeySecret</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a754"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooApplication.html#var$consumer">consumer</a>&nbsp;=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthConsumer.html">OAuthConsumer</a></span><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerKeySecret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a755"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a756"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a757"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a758"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Sets&nbsp;the&nbsp;small&nbsp;view&nbsp;for&nbsp;the&nbsp;user&nbsp;given&nbsp;by&nbsp;the&nbsp;GUID.</span></div></li>
<li><div class="src-line"><a name="a759"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a760"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$guid&nbsp;</span><span class="src-doc">The&nbsp;GUID&nbsp;of&nbsp;the&nbsp;user&nbsp;to&nbsp;set&nbsp;the&nbsp;small&nbsp;view&nbsp;for.</span></div></li>
<li><div class="src-line"><a name="a761"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$content&nbsp;</span><span class="src-doc">The&nbsp;content&nbsp;to&nbsp;set&nbsp;the&nbsp;small&nbsp;view&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a762"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">on&nbsp;success,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a763"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a764"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooApplication.html#methodsetSmallView">setSmallView</a><span class="src-sym">(</span><span class="src-var">$guid</span><span class="src-sym">,&nbsp;</span><span class="src-var">$content</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a765"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a766"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a767"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$client&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/OAuthClient.html">OAuthClient</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooApplication.html#var$consumer">consumer</a><span class="src-sym">,&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a768"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a769"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/cache/view/small/%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;YAP_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$guid</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a770"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$client</span><span class="src-sym">-&gt;</span><span class="src-id">put</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;text/html;charset=utf-8&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$content</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a771"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a772"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a773"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a774"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a775"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a776"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Executes&nbsp;the&nbsp;given&nbsp;YQL&nbsp;query.</span></div></li>
<li><div class="src-line"><a name="a777"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a778"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$yql&nbsp;</span><span class="src-doc">The&nbsp;query&nbsp;to&nbsp;execute.</span></div></li>
<li><div class="src-line"><a name="a779"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$env&nbsp;</span><span class="src-doc">A&nbsp;URL&nbsp;to&nbsp;a&nbsp;YQL&nbsp;environment&nbsp;file.</span></div></li>
<li><div class="src-line"><a name="a780"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">response&nbsp;or&nbsp;NULL&nbsp;if&nbsp;the&nbsp;request&nbsp;fails..</span></div></li>
<li><div class="src-line"><a name="a781"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a782"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooApplication.html#methodquery">query</a><span class="src-sym">(</span><span class="src-var">$yql</span><span class="src-sym">,&nbsp;</span><span class="src-var">$env</span>=<span class="src-id">NULL</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a783"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a784"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a785"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a786"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$client&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/OAuthClient.html">OAuthClient</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooApplication.html#var$consumer">consumer</a><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooApplication.html#var$token">token</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a787"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a788"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/yql&quot;</span><span class="src-sym">,</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;QUERY_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a789"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$params&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'q'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$yql</span><span class="src-sym">,&nbsp;</span><span class="src-str">'format'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'json'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'env'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'http://datatables.org/alltables.env'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a790"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a791"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$env</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a792"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$params</span><span class="src-sym">[</span><span class="src-str">'env'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$env</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a793"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a794"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a795"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$client</span><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-var">$params</span><span class="src-sym">,&nbsp;</span><span class="src-num">30</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a796"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a797"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a798"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a799"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a800"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a801"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$resultSet&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a802"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a803"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$resultSet</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a804"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a805"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a806"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a807"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a808"></a><span class="src-doc">&nbsp;*&nbsp;Represents&nbsp;a&nbsp;Yahoo!&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a809"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a810"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@brief</span><span class="src-doc">&nbsp;Represents&nbsp;a&nbsp;Yahoo!&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a811"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a812"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooUser.html">YahooUser</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a813"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a814"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a815"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a816"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooUser.html#var$session">$session</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a817"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a818"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a819"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a820"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a821"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooUser.html#var$guid">$guid</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a822"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a823"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a824"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a825"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a826"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">$sessioned</a>&nbsp;=&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a827"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a828"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a829"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a830"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a831"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooUser.html#var$client">$client</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a832"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a833"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a834"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a835"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a836"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodYahooUser">YahooUser</a><span class="src-sym">(</span><span class="src-var">$session</span><span class="src-sym">,&nbsp;</span><span class="src-var">$guid</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sessioned</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a837"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$session">session</a>&nbsp;=&nbsp;<span class="src-var">$session</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a838"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a>&nbsp;=&nbsp;<span class="src-var">$session</span><span class="src-sym">-&gt;</span><span class="src-id">client</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a839"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a>&nbsp;=&nbsp;<span class="src-var">$guid</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a840"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a>&nbsp;=&nbsp;<span class="src-var">$sessioned</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a841"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a842"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a843"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a844"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;user's&nbsp;status&nbsp;message.</span></div></li>
<li><div class="src-line"><a name="a845"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a846"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">status&nbsp;of&nbsp;the&nbsp;user&nbsp;or&nbsp;NULL&nbsp;if&nbsp;the&nbsp;fetch&nbsp;fails.</span></div></li>
<li><div class="src-line"><a name="a847"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a848"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetStatus">getStatus</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a849"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a850"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a851"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/profile/status&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a852"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;SOCIAL_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a853"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a854"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a855"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a856"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a857"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a858"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a859"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-num">404</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a860"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;No&nbsp;presence&nbsp;is&nbsp;set,&nbsp;return&nbsp;an&nbsp;empty&nbsp;presence.</span></div></li>
<li><div class="src-line"><a name="a861"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a862"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$status&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a863"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$status</span><span class="src-sym">-&gt;</span><span class="src-id">message&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a864"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$status</span><span class="src-sym">-&gt;</span><span class="src-id">lastStatusModified&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a865"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$status</span><span class="src-sym">-&gt;</span><span class="src-id">uri&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a866"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$status</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a867"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a868"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>!=&nbsp;<span class="src-num">200</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a869"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a870"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a871"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a872"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rsp&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a873"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$rsp</span><span class="src-sym">-&gt;</span><span class="src-id">status</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a874"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a875"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a876"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a877"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a878"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Sets&nbsp;the&nbsp;user's&nbsp;status&nbsp;message.</span></div></li>
<li><div class="src-line"><a name="a879"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a880"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$message&nbsp;</span><span class="src-doc">The&nbsp;new&nbsp;status&nbsp;message&nbsp;for&nbsp;the&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a881"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">status&nbsp;message&nbsp;on&nbsp;success,&nbsp;NULL&nbsp;on&nbsp;failure.</span></div></li>
<li><div class="src-line"><a name="a882"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a883"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodsetStatus">setStatus</a><span class="src-sym">(</span><span class="src-var">$message</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a884"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a885"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a886"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a887"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;set&nbsp;the&nbsp;status&nbsp;of&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a888"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a889"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a890"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a891"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$message&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;message&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$message</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a892"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$status&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;status&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$message</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a893"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$status_json&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$status</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a894"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a895"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/profile/status&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;SOCIAL_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a896"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a897"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">put</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;application/json&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$status_json</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a898"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a899"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a900"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a901"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a902"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a903"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$status&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a904"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$status</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a905"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a906"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a907"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a908"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;updates&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a909"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a910"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$start&nbsp;</span><span class="src-doc">The&nbsp;starting&nbsp;offset&nbsp;to&nbsp;list&nbsp;updates&nbsp;from.&nbsp;(default&nbsp;=&nbsp;0)</span></div></li>
<li><div class="src-line"><a name="a911"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$count&nbsp;</span><span class="src-doc">The&nbsp;number&nbsp;of&nbsp;updates&nbsp;to&nbsp;request.&nbsp;(default&nbsp;=&nbsp;10)</span></div></li>
<li><div class="src-line"><a name="a912"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">An&nbsp;</span><span class="src-doc">array&nbsp;of&nbsp;updates&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a913"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a914"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetUpdates">getUpdates</a><span class="src-sym">(</span><span class="src-var">$start&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$count&nbsp;</span>=&nbsp;<span class="src-num">10</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a915"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;start&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;count&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$count</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;transform&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">'(sort&nbsp;&quot;pubDate&quot;&nbsp;numeric&nbsp;descending&nbsp;(all))'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a916"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$updates&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><span class="src-str">&quot;updates&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a917"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a918"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$updates</span><span class="src-sym">-&gt;</span><span class="src-id">updates</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a919"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a920"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a921"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a922"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;updates&nbsp;for&nbsp;the&nbsp;connections&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a923"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a924"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$start&nbsp;</span><span class="src-doc">The&nbsp;starting&nbsp;offset&nbsp;to&nbsp;list&nbsp;updates&nbsp;from.</span></div></li>
<li><div class="src-line"><a name="a925"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$count&nbsp;</span><span class="src-doc">The&nbsp;number&nbsp;of&nbsp;updates&nbsp;to&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a926"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">A&nbsp;</span><span class="src-doc">list&nbsp;of&nbsp;updates&nbsp;for&nbsp;the&nbsp;connections&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a927"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a928"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetConnectionUpdates">getConnectionUpdates</a><span class="src-sym">(</span><span class="src-var">$start&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$count&nbsp;</span>=&nbsp;<span class="src-num">10</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a929"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;start&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;count&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$count</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;transform&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">'(sort&nbsp;&quot;pubDate&quot;&nbsp;numeric&nbsp;descending&nbsp;(all))'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a930"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$updates&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><span class="src-str">&quot;updates/connections&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a931"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a932"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$updates</span><span class="src-sym">-&gt;</span><span class="src-id">updates</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a933"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a934"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a935"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a936"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Inserts&nbsp;an&nbsp;update&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a937"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a938"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$suid&nbsp;</span><span class="src-doc">Identifier&nbsp;that&nbsp;globally&nbsp;unique&nbsp;for&nbsp;a&nbsp;given</span></div></li>
<li><div class="src-line"><a name="a939"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;collectionId&nbsp;within&nbsp;producing&nbsp;source.</span></div></li>
<li><div class="src-line"><a name="a940"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$title&nbsp;</span><span class="src-doc">Title&nbsp;for&nbsp;the&nbsp;update.</span></div></li>
<li><div class="src-line"><a name="a941"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$link&nbsp;</span><span class="src-doc">Link&nbsp;back&nbsp;to&nbsp;the&nbsp;cause&nbsp;of&nbsp;the&nbsp;event.</span></div></li>
<li><div class="src-line"><a name="a942"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$description&nbsp;</span><span class="src-doc">Descriptive&nbsp;text&nbsp;associated&nbsp;with&nbsp;the&nbsp;update,</span></div></li>
<li><div class="src-line"><a name="a943"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;optional.</span></div></li>
<li><div class="src-line"><a name="a944"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$date&nbsp;</span><span class="src-doc">The&nbsp;date&nbsp;of&nbsp;the&nbsp;update&nbsp;event,&nbsp;optional,&nbsp;defaults&nbsp;to&nbsp;now.</span></div></li>
<li><div class="src-line"><a name="a945"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a946"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodinsertUpdate">insertUpdate</a><span class="src-sym">(</span><span class="src-var">$suid</span><span class="src-sym">,&nbsp;</span><span class="src-var">$title</span><span class="src-sym">,&nbsp;</span><span class="src-var">$link</span><span class="src-sym">,&nbsp;</span><span class="src-var">$description</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$date</span>=<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a947"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a948"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a949"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Make&nbsp;sure&nbsp;this&nbsp;YahooUser&nbsp;is&nbsp;sessioned.</span></div></li>
<li><div class="src-line"><a name="a950"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a951"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;insert&nbsp;updates&nbsp;for&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a952"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a953"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a954"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a955"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$date</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a956"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$date&nbsp;</span>=&nbsp;<a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a957"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a958"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a959"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Make&nbsp;sure&nbsp;an&nbsp;application&nbsp;ID&nbsp;was&nbsp;given.</span></div></li>
<li><div class="src-line"><a name="a960"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$appid&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$session">session</a><span class="src-sym">-&gt;</span><span class="src-id">getApplicationId</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a961"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$appid</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a962"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;No&nbsp;application&nbsp;ID&nbsp;given,&nbsp;can't&nbsp;insert&nbsp;update&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a963"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a964"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a965"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a966"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$source&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;APP.%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$appid</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a967"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a968"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$update&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a969"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;collectionID&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a970"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;collectionType&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;guid&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a971"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;class&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;app&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a972"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;source&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$source</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a973"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;type&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">'appActivity'</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a974"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;suid&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$suid</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a975"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;title&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$title</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a976"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;description&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$description</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a977"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;link&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$link</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a978"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;pubDate&quot;&nbsp;</span>=&gt;&nbsp;(string)<span class="src-var">$date</span></div></li>
<li><div class="src-line"><a name="a979"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a980"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a981"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$update_body&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;updates&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$update</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a982"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$update_body_json&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$update_body</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a983"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a984"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/updates/%s/%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;UPDATES_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">,&nbsp;</span><span class="src-var">$source</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$suid</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a985"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a986"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">put</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;application/json&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$update_body_json</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a987"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a988"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a989"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a990"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a991"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a992"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Deletes&nbsp;the&nbsp;update&nbsp;of&nbsp;the&nbsp;given&nbsp;SUID.&nbsp;Only&nbsp;allows&nbsp;deleting&nbsp;updates</span></div></li>
<li><div class="src-line"><a name="a993"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;that&nbsp;were&nbsp;inserted&nbsp;by&nbsp;your&nbsp;own&nbsp;application.&nbsp;You&nbsp;won't&nbsp;be&nbsp;able&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a994"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;delete&nbsp;updates&nbsp;from&nbsp;other&nbsp;applications.</span></div></li>
<li><div class="src-line"><a name="a995"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a996"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$suid&nbsp;</span><span class="src-doc">The&nbsp;SUID&nbsp;of&nbsp;the&nbsp;update&nbsp;to&nbsp;be&nbsp;deleted.</span></div></li>
<li><div class="src-line"><a name="a997"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">boolean&nbsp;</span><span class="src-doc">True&nbsp;on&nbsp;success,&nbsp;false&nbsp;on&nbsp;failure.</span></div></li>
<li><div class="src-line"><a name="a998"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a999"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methoddeleteUpdate">deleteUpdate</a><span class="src-sym">(</span><span class="src-var">$suid</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1000"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1001"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1002"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Make&nbsp;sure&nbsp;this&nbsp;YahooUser&nbsp;is&nbsp;sessioned.</span></div></li>
<li><div class="src-line"><a name="a1003"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1004"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;delete&nbsp;updates&nbsp;for&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1005"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1006"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1007"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1008"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Make&nbsp;sure&nbsp;an&nbsp;application&nbsp;ID&nbsp;was&nbsp;given.</span></div></li>
<li><div class="src-line"><a name="a1009"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$appid&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$session">session</a><span class="src-sym">-&gt;</span><span class="src-id">getApplicationId</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1010"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$appid</span><span class="src-sym">)&nbsp;)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1011"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;No&nbsp;application&nbsp;ID&nbsp;given,&nbsp;can't&nbsp;delete&nbsp;update&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1012"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">FALSE</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1013"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1014"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1015"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$source&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;APP.%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$appid</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1016"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1017"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/updates/%s/%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;UPDATES_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">,&nbsp;</span><span class="src-var">$source</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$suid</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1018"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1019"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">delete</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1020"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1021"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1022"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1023"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1024"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1025"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Loads&nbsp;the&nbsp;extended&nbsp;profile&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1026"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1027"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">extended&nbsp;profile&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1028"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1029"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetProfile">getProfile</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1030"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1031"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1032"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$profile&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><span class="src-str">&quot;profile&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1033"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1034"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$profile</span><span class="src-sym">-&gt;</span><span class="src-id">profile</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1035"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1036"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1037"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1038"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;a&nbsp;list&nbsp;of&nbsp;connections&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1039"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1040"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@param[in,out]</span><span class="src-doc">&nbsp;$start&nbsp;The&nbsp;starting&nbsp;offset.</span></div></li>
<li><div class="src-line"><a name="a1041"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@param[in,out]</span><span class="src-doc">&nbsp;$count&nbsp;The&nbsp;number&nbsp;of&nbsp;connections&nbsp;to&nbsp;fetch.</span></div></li>
<li><div class="src-line"><a name="a1042"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@param[out]</span><span class="src-doc">&nbsp;$total&nbsp;The&nbsp;total&nbsp;number&nbsp;of&nbsp;contacts&nbsp;available.</span></div></li>
<li><div class="src-line"><a name="a1043"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">List&nbsp;</span><span class="src-doc">of&nbsp;connections&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1044"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1045"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetConnections">getConnections</a><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$count</span><span class="src-sym">,&nbsp;</span><span class="src-sym">&amp;</span><span class="src-var">$total</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1046"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1047"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1048"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;view&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;usercard&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;start&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;count&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$count</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1049"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$connections&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><span class="src-str">&quot;connections&quot;</span><span class="src-sym">,</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1050"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1051"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$start&nbsp;</span>=&nbsp;<span class="src-var">$connections</span><span class="src-sym">-&gt;</span><span class="src-id">connections</span><span class="src-sym">-&gt;</span><span class="src-id">start</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1052"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$count&nbsp;</span>=&nbsp;<span class="src-var">$connections</span><span class="src-sym">-&gt;</span><span class="src-id">connections</span><span class="src-sym">-&gt;</span><span class="src-id">count</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1053"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$total&nbsp;</span>=&nbsp;<span class="src-var">$connections</span><span class="src-sym">-&gt;</span><span class="src-id">connections</span><span class="src-sym">-&gt;</span><span class="src-id">total</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1054"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1055"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$connections</span><span class="src-sym">-&gt;</span><span class="src-id">connections</span><span class="src-sym">-&gt;</span><span class="src-id">connection</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1056"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1057"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1058"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1059"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;a&nbsp;list&nbsp;of&nbsp;contacts&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1060"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1061"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$start&nbsp;</span><span class="src-doc">The&nbsp;starting&nbsp;offset.</span></div></li>
<li><div class="src-line"><a name="a1062"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$count&nbsp;</span><span class="src-doc">The&nbsp;number&nbsp;of&nbsp;contacts&nbsp;to&nbsp;fetch.</span></div></li>
<li><div class="src-line"><a name="a1063"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">List&nbsp;</span><span class="src-doc">of&nbsp;contacts&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1064"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1065"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetContacts">getContacts</a><span class="src-sym">(</span><span class="src-var">$start&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$count&nbsp;</span>=&nbsp;<span class="src-num">10</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1066"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1067"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1068"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1069"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;get&nbsp;contacts&nbsp;for&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1070"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1071"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1072"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1073"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;view&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;tinyusercard&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;start&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;count&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$count</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1074"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$contacts&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><span class="src-str">&quot;contacts&quot;</span><span class="src-sym">,</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1075"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1076"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$contacts</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1077"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1078"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1079"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetContact">getContact</a><span class="src-sym">(</span><span class="src-var">$contact_id</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a1080"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1081"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1082"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1083"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1084"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;get&nbsp;contacts&nbsp;for&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1085"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1086"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1087"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1088"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1089"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$contacts&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;contact/%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$contact_id</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1090"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1091"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$contacts</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1092"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1093"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1094"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetContactSync">getContactSync</a><span class="src-sym">(</span><span class="src-var">$rev&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a1095"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1096"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1097"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1098"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1099"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;get&nbsp;contacts&nbsp;for&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1100"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1101"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1102"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1103"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'view'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'sync'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'rev'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$rev</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1104"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$contactsync&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><span class="src-str">&quot;contacts&quot;</span><span class="src-sym">,</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1105"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1106"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$contactsync</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1107"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1108"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1109"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodsyncContacts">syncContacts</a><span class="src-sym">(</span><span class="src-var">$contactsync</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a1110"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1111"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1112"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1113"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1114"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;get&nbsp;contacts&nbsp;for&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1115"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1116"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1117"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1118"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'format'&nbsp;</span>=&gt;&nbsp;<span class="src-str">'json'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1119"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1120"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'contactsync'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$contactsync</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1121"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$body&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1122"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1123"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/contacts&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;SOCIAL_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1124"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1125"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">put</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;application/json&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$body</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1126"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1127"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1128"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1129"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1130"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodaddContact">addContact</a><span class="src-sym">(</span><span class="src-var">$contact</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a1131"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1132"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1133"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1134"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1135"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;get&nbsp;contacts&nbsp;for&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1136"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1137"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1138"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1139"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'contact'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$contact</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1140"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$body&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1141"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1142"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/contacts&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;SOCIAL_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1143"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1144"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">post</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;application/json&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$body</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1145"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1146"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">!</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1147"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1148"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1149"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1150"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Sets&nbsp;the&nbsp;small&nbsp;view&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1151"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1152"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$content&nbsp;</span><span class="src-doc">The&nbsp;content&nbsp;to&nbsp;set&nbsp;the&nbsp;small&nbsp;view&nbsp;to.</span></div></li>
<li><div class="src-line"><a name="a1153"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">on&nbsp;success,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1154"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1155"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodsetSmallView">setSmallView</a><span class="src-sym">(</span><span class="src-var">$content</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1156"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$session">session</a><span class="src-sym">-&gt;</span><span class="src-id">application</span><span class="src-sym">-&gt;</span><span class="src-id">setSmallView</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">,&nbsp;</span><span class="src-var">$content</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1157"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1158"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1159"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1160"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1161"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1162"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodget_resource">get_resource</a><span class="src-sym">(</span><span class="src-var">$resource</span><span class="src-sym">,&nbsp;</span><span class="src-var">$parameters</span>=<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a1163"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1164"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1165"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1166"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/%s&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1167"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;SOCIAL_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$resource</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1168"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1169"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1170"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$data&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1171"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1172"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span>?&nbsp;<span class="src-id">null&nbsp;</span>:&nbsp;<span class="src-var">$data</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1173"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1174"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1175"></a>&nbsp;&nbsp;<span class="src-comm">///////////////////////////////////////////////////////////////////////////</span></div></li>
<li><div class="src-line"><a name="a1176"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;Deprecated&nbsp;methods</span></div></li>
<li><div class="src-line"><a name="a1177"></a>&nbsp;&nbsp;<span class="src-comm">///////////////////////////////////////////////////////////////////////////</span></div></li>
<li><div class="src-line"><a name="a1178"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1179"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1180"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Loads&nbsp;the&nbsp;extended&nbsp;profile&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1181"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span><span class="src-doc">&nbsp;As&nbsp;of&nbsp;1.2,&nbsp;replaced&nbsp;by&nbsp;getProfile.</span></div></li>
<li><div class="src-line"><a name="a1182"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">extended&nbsp;profile&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1183"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1184"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodloadProfile">loadProfile</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1185"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;method&nbsp;renamed,&nbsp;keeping&nbsp;for&nbsp;compatibility.</span></div></li>
<li><div class="src-line"><a name="a1186"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methodinfo">info</a><span class="src-sym">(</span><span class="src-str">&quot;loadProfile&nbsp;is&nbsp;deprecated&nbsp;since&nbsp;1.2:&nbsp;Please&nbsp;use&nbsp;getProfile&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1187"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1188"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodgetProfile">getProfile</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1189"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1190"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1191"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1192"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Lists&nbsp;the&nbsp;updates&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1193"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span><span class="src-doc">&nbsp;As&nbsp;of&nbsp;1.2,&nbsp;replaced&nbsp;by&nbsp;getUpdates.</span></div></li>
<li><div class="src-line"><a name="a1194"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1195"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1196"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$start&nbsp;</span><span class="src-doc">The&nbsp;starting&nbsp;offset&nbsp;to&nbsp;list&nbsp;updates&nbsp;from.&nbsp;(default&nbsp;=&nbsp;0)</span></div></li>
<li><div class="src-line"><a name="a1197"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$count&nbsp;</span><span class="src-doc">The&nbsp;number&nbsp;of&nbsp;updates&nbsp;to&nbsp;request.&nbsp;(default&nbsp;=&nbsp;10)</span></div></li>
<li><div class="src-line"><a name="a1198"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">A&nbsp;</span><span class="src-doc">list&nbsp;of&nbsp;updates&nbsp;for&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1199"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1200"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodlistUpdates">listUpdates</a><span class="src-sym">(</span><span class="src-var">$start&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$count&nbsp;</span>=&nbsp;<span class="src-num">10</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1201"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;method&nbsp;renamed,&nbsp;keeping&nbsp;for&nbsp;compatibility.</span></div></li>
<li><div class="src-line"><a name="a1202"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methodinfo">info</a><span class="src-sym">(</span><span class="src-str">&quot;listUpdates&nbsp;is&nbsp;deprecated&nbsp;since&nbsp;1.2:&nbsp;Please&nbsp;use&nbsp;getUpdates&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1203"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1204"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodgetUpdates">getUpdates</a><span class="src-sym">(</span><span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-var">$count</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1205"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1206"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1207"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1208"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;updates&nbsp;for&nbsp;the&nbsp;connections&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1209"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span><span class="src-doc">&nbsp;As&nbsp;of&nbsp;1.2,&nbsp;replaced&nbsp;by&nbsp;getConnectionUpdates.</span></div></li>
<li><div class="src-line"><a name="a1210"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$start&nbsp;</span><span class="src-doc">The&nbsp;starting&nbsp;offset&nbsp;to&nbsp;list&nbsp;updates&nbsp;from.</span></div></li>
<li><div class="src-line"><a name="a1211"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$count&nbsp;</span><span class="src-doc">The&nbsp;number&nbsp;of&nbsp;updates&nbsp;to&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1212"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">An&nbsp;</span><span class="src-doc">array&nbsp;of&nbsp;updates&nbsp;for&nbsp;the&nbsp;connections&nbsp;of&nbsp;the&nbsp;current&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1213"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1214"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodlistConnectionUpdates">listConnectionUpdates</a><span class="src-sym">(</span><span class="src-var">$start&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$count&nbsp;</span>=&nbsp;<span class="src-num">10</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1215"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;method&nbsp;renamed,&nbsp;keeping&nbsp;for&nbsp;compatibility.</span></div></li>
<li><div class="src-line"><a name="a1216"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methodinfo">info</a><span class="src-sym">(</span><span class="src-str">&quot;listConnectionUpdates&nbsp;is&nbsp;deprecated&nbsp;since&nbsp;1.2:&nbsp;Please&nbsp;use&nbsp;getConnectionUpdates&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1217"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1218"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#methodgetConnectionUpdates">getConnectionUpdates</a><span class="src-sym">(</span><span class="src-var">$start</span><span class="src-sym">,&nbsp;</span><span class="src-var">$count</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1219"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1220"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1221"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1222"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Gets&nbsp;the&nbsp;presence&nbsp;of&nbsp;the&nbsp;user,&nbsp;including&nbsp;the&nbsp;status.</span></div></li>
<li><div class="src-line"><a name="a1223"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1224"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">presence&nbsp;of&nbsp;the&nbsp;user&nbsp;or&nbsp;NULL&nbsp;if&nbsp;the&nbsp;fetch&nbsp;fails.</span></div></li>
<li><div class="src-line"><a name="a1225"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span><span class="src-doc">&nbsp;As&nbsp;of&nbsp;1.2,&nbsp;replaced&nbsp;by&nbsp;getStatus</span></div></li>
<li><div class="src-line"><a name="a1226"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1227"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodgetPresence">getPresence</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1228"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1229"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1230"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methodinfo">info</a><span class="src-sym">(</span><span class="src-str">&quot;getPresence&nbsp;is&nbsp;deprecated&nbsp;since&nbsp;1.2:&nbsp;Please&nbsp;use&nbsp;getStatus.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1231"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1232"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/presence/presence&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1233"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;PRESENCE_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span><a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1234"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1235"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1236"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1237"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1238"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1239"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1240"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>==&nbsp;<span class="src-num">404</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1241"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;No&nbsp;presence&nbsp;is&nbsp;set,&nbsp;return&nbsp;an&nbsp;empty&nbsp;presence.</span></div></li>
<li><div class="src-line"><a name="a1242"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$presence&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1243"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$presence</span><span class="src-sym">-&gt;</span><span class="src-id">value&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1244"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$presence</span><span class="src-sym">-&gt;</span><span class="src-id">value</span><span class="src-sym">-&gt;</span><span class="src-id">status&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1245"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$presence</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1246"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1247"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>!=&nbsp;<span class="src-num">200</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1248"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1249"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1250"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1251"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$presence&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1252"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$presence</span><span class="src-sym">-&gt;</span><span class="src-id">presence</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1253"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1254"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1255"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1256"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1257"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Sets&nbsp;the&nbsp;presence&nbsp;of&nbsp;the&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1258"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1259"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$status&nbsp;</span><span class="src-doc">The&nbsp;new&nbsp;status&nbsp;message&nbsp;for&nbsp;the&nbsp;user.</span></div></li>
<li><div class="src-line"><a name="a1260"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">status&nbsp;message&nbsp;on&nbsp;success,&nbsp;NULL&nbsp;on&nbsp;failure.</span></div></li>
<li><div class="src-line"><a name="a1261"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@deprecated</span><span class="src-doc">&nbsp;As&nbsp;of&nbsp;1.2,&nbsp;replaced&nbsp;by&nbsp;setStatus</span></div></li>
<li><div class="src-line"><a name="a1262"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1263"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooUser.html#methodsetPresence">setPresence</a><span class="src-sym">(</span><span class="src-var">$status</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1264"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1265"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1266"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methodinfo">info</a><span class="src-sym">(</span><span class="src-str">&quot;setPresence&nbsp;is&nbsp;deprecated&nbsp;since&nbsp;1.2:&nbsp;Please&nbsp;use&nbsp;setStatus&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1267"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1268"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$sessioned">sessioned</a><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1269"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Can't&nbsp;set&nbsp;the&nbsp;presence&nbsp;of&nbsp;an&nbsp;unsessioned&nbsp;user&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1270"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1271"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1272"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1273"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$presence&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;status&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$status</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1274"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$presence_json&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$presence</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1275"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1276"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;http://%s/v1/user/%s/presence/presence&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;PRESENCE_WS_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$guid">guid</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1277"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1278"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooUser.html#var$client">client</a><span class="src-sym">-&gt;</span><span class="src-id">put</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;application/json&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$presence_json</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1279"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1280"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-id"><a href="../yos-social-php/YahooUtil.html">YahooUtil</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooUtil.html#methodis_response_error">is_response_error</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1281"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1282"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1283"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1284"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$presence&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1285"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$presence</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1286"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1287"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1288"></a>&nbsp;&nbsp;<span class="src-comm">///////////////////////////////////////////////////////////////////////////</span></div></li>
<li><div class="src-line"><a name="a1289"></a>&nbsp;&nbsp;<span class="src-comm">//&nbsp;End&nbsp;Deprecated&nbsp;methods</span></div></li>
<li><div class="src-line"><a name="a1290"></a>&nbsp;&nbsp;<span class="src-comm">///////////////////////////////////////////////////////////////////////////</span></div></li>
<li><div class="src-line"><a name="a1291"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1292"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1293"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1294"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1295"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1296"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooAuthorization.html">YahooAuthorization</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1297"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooAuthorization.html#methodgetRequestToken">getRequestToken</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$callback</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1298"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1299"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1300"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$callback</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1301"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$callback&nbsp;</span>=&nbsp;<span class="src-str">&quot;oob&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1302"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1303"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1304"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthConsumer.html">OAuthConsumer</a></span><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1305"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$client&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/OAuthClient.html">OAuthClient</a></span><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_PARAMS_IN_POST_BODY">OAUTH_PARAMS_IN_POST_BODY</a></span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_SIGNATURE_HMAC_SHA1">OAUTH_SIGNATURE_HMAC_SHA1</a></span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1306"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1307"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;https://%s/oauth/v2/get_request_token&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;OAUTH_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1308"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;oauth_callback&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$callback</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1309"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1310"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$client</span><span class="src-sym">-&gt;</span><span class="src-id">post</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;application/x-www-form-urlencoded&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1311"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1312"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1313"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;OAuth&nbsp;call&nbsp;to&nbsp;get&nbsp;request&nbsp;token&nbsp;failed&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1314"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1315"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1316"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1317"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/parse_str">parse_str</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1318"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1319"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>!=&nbsp;<span class="src-num">200</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1320"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$problem&nbsp;</span>=&nbsp;<a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;oauth_problem&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span><span class="src-sym">)&nbsp;</span>?</div></li>
<li><div class="src-line"><a name="a1321"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_problem&quot;</span><span class="src-sym">]&nbsp;</span>:&nbsp;<span class="src-str">&quot;unknown&nbsp;problem&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1322"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">Failed&nbsp;to&nbsp;create&nbsp;request&nbsp;token:&nbsp;<span class="src-var">$problem</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1323"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1324"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1325"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1326"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;oauth_callback_confirmed&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a1327"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">!</span><span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_callback_confirmed&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1328"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Callback&nbsp;wasn't&nbsp;confirmed.</span></div></li>
<li><div class="src-line"><a name="a1329"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Failed&nbsp;to&nbsp;create&nbsp;request&nbsp;token:&nbsp;callback&nbsp;was&nbsp;not&nbsp;confirmed&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1330"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1331"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1332"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1333"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestToken&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1334"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestToken</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>=&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_token&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1335"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestToken</span><span class="src-sym">-&gt;</span><span class="src-id">secret&nbsp;</span>=&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_token_secret&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1336"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$requestToken</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1337"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1338"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1339"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooAuthorization.html#methodcreateAuthorizationUrl">createAuthorizationUrl</a><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1340"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1341"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1342"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-sym">!</span><a href="../yos-social-php/_Yahoo.inc.html#functionproperty_exists">property_exists</a><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;key&quot;</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1343"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Request&nbsp;token&nbsp;doesn't&nbsp;have&nbsp;a&nbsp;'key'&nbsp;property&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1344"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1345"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1346"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1347"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;https://%s/oauth/v2/request_auth?oauth_token=%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;OAUTH_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/urlencode">urlencode</a><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">-&gt;</span><span class="src-id">key</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1348"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1349"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1350"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooAuthorization.html#methodgetAccessToken">getAccessToken</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1351"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$at&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooAuthorization.html">YahooAuthorization</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooAuthorization.html#methodgetAccessTokenProxy">getAccessTokenProxy</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1352"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1353"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$at</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1354"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Failed&nbsp;to&nbsp;fetch&nbsp;the&nbsp;access&nbsp;token,&nbsp;sleep&nbsp;for&nbsp;250ms&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a1355"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;then&nbsp;try&nbsp;one&nbsp;more&nbsp;time.</span></div></li>
<li><div class="src-line"><a name="a1356"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methodinfo">info</a><span class="src-sym">(</span><span class="src-str">&quot;Failed&nbsp;to&nbsp;fetch&nbsp;access&nbsp;token,&nbsp;retrying&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1357"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/usleep">usleep</a><span class="src-sym">(</span><span class="src-num">250000</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1358"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$at&nbsp;</span>=&nbsp;<span class="src-id"><a href="../yos-social-php/YahooAuthorization.html">YahooAuthorization</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooAuthorization.html#methodgetAccessTokenProxy">getAccessTokenProxy</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1359"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1360"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1361"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$at</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1362"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1363"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1364"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooAuthorization.html#methodgetAccessTokenProxy">getAccessTokenProxy</a><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">,&nbsp;</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-var">$verifier</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1365"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1366"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1367"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request_url&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;https://%s/oauth/v2/get_token&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;OAUTH_HOSTNAME&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1368"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1369"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$consumer&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthConsumer.html">OAuthConsumer</a></span><span class="src-sym">(</span><span class="src-var">$consumerKey</span><span class="src-sym">,&nbsp;</span><span class="src-var">$consumerSecret</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1370"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1371"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1372"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="../yos-social-php/_Yahoo.inc.html#functionproperty_exists">property_exists</a><span class="src-sym">(</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;sessionHandle&quot;</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1373"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_session_handle&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$requestToken</span><span class="src-sym">-&gt;</span><span class="src-id">sessionHandle</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1374"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1375"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1376"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$verifier</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1377"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$parameters</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_verifier&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$verifier</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1378"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1379"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1380"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$client&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/OAuthClient.html">OAuthClient</a></span><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$requestToken</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_PARAMS_IN_POST_BODY">OAUTH_PARAMS_IN_POST_BODY</a></span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1381"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1382"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-var">$client</span><span class="src-sym">-&gt;</span><span class="src-id">post</span><span class="src-sym">(</span><span class="src-var">$request_url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;application/x-www-form-urlencoded&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$parameters</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1383"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1384"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_null">is_null</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1385"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;OAuth&nbsp;call&nbsp;to&nbsp;get&nbsp;access&nbsp;token&nbsp;failed&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1386"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1387"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1388"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1389"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/parse_str">parse_str</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;responseBody&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1390"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1391"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>!=&nbsp;<span class="src-num">200</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1392"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Failed&nbsp;to&nbsp;fetch&nbsp;access&nbsp;token:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_problem&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1393"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1394"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1395"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1396"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$now&nbsp;</span>=&nbsp;<a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1397"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1398"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">stdclass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1399"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">key&nbsp;</span>=&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_token&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1400"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">secret&nbsp;</span>=&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_token_secret&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1401"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">guid&nbsp;</span>=&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;xoauth_yahoo_guid&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1402"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">consumer&nbsp;</span>=&nbsp;<span class="src-var">$consumerKey</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1403"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">sessionHandle&nbsp;</span>=&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_session_handle&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1404"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1405"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Check&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;access&nbsp;token&nbsp;ever&nbsp;expires.</span></div></li>
<li><div class="src-line"><a name="a1406"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-str">'AT&nbsp;expires&nbsp;in&nbsp;'</span>.<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">'oauth_expires_in'</span><span class="src-sym">]</span>.<span class="src-str">';&nbsp;ASH&nbsp;expires&nbsp;in&nbsp;'</span>.<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_authorization_expires_in&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1407"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;oauth_expires_in&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1408"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">tokenExpires&nbsp;</span>=&nbsp;<span class="src-var">$now&nbsp;</span>+&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_expires_in&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1409"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1410"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1411"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">tokenExpires&nbsp;</span>=&nbsp;-<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1412"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1413"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1414"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Check&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;access&nbsp;session&nbsp;handle&nbsp;ever&nbsp;expires.</span></div></li>
<li><div class="src-line"><a name="a1415"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;oauth_authorization_expires_in&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1416"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">handleExpires&nbsp;</span>=&nbsp;<span class="src-var">$now&nbsp;</span>+</div></li>
<li><div class="src-line"><a name="a1417"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$token</span><span class="src-sym">[</span><span class="src-str">&quot;oauth_authorization_expires_in&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1418"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1419"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1420"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$accessToken</span><span class="src-sym">-&gt;</span><span class="src-id">handleExpires&nbsp;</span>=&nbsp;-<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1421"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1422"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$accessToken</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1423"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1424"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1425"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1426"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1427"></a><span class="src-doc">&nbsp;*&nbsp;Cookie-based&nbsp;implementation&nbsp;of&nbsp;the&nbsp;session&nbsp;store.&nbsp;This&nbsp;is&nbsp;the&nbsp;default</span></div></li>
<li><div class="src-line"><a name="a1428"></a><span class="src-doc">&nbsp;*&nbsp;session&nbsp;storage&nbsp;used&nbsp;by&nbsp;the&nbsp;Y!OS&nbsp;PHP&nbsp;SDK.&nbsp;Developers&nbsp;are&nbsp;free&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a1429"></a><span class="src-doc">&nbsp;*&nbsp;implement&nbsp;their&nbsp;own&nbsp;session&nbsp;store&nbsp;implementations&nbsp;and&nbsp;pass&nbsp;them&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a1430"></a><span class="src-doc">&nbsp;*&nbsp;YahooSession::hasSession,&nbsp;YahooSession::requireSession&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a1431"></a><span class="src-doc">&nbsp;*&nbsp;YahooSession::clearSession.&nbsp;By&nbsp;default,&nbsp;if&nbsp;no&nbsp;session&nbsp;store&nbsp;is&nbsp;passed</span></div></li>
<li><div class="src-line"><a name="a1432"></a><span class="src-doc">&nbsp;*&nbsp;to&nbsp;YahooSession::hasSession&nbsp;or&nbsp;YahooSession::requireSession,&nbsp;an&nbsp;instance</span></div></li>
<li><div class="src-line"><a name="a1433"></a><span class="src-doc">&nbsp;*&nbsp;of&nbsp;a&nbsp;NativeSessionStore&nbsp;is&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a1434"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1435"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@brief</span><span class="src-doc">&nbsp;Cookie-based&nbsp;implementation&nbsp;of&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1436"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1437"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html">CookieSessionStore</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1438"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1439"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Indicates&nbsp;if&nbsp;the&nbsp;session&nbsp;store&nbsp;has&nbsp;a&nbsp;request&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1440"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1441"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">if&nbsp;a&nbsp;request&nbsp;token&nbsp;is&nbsp;present,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1442"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1443"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodhasRequestToken">hasRequestToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1444"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_COOKIE</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$_COOKIE</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&gt;&nbsp;<span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1445"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1446"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1447"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1448"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Indicates&nbsp;if&nbsp;the&nbsp;session&nbsp;store&nbsp;has&nbsp;an&nbsp;access&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1449"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1450"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">if&nbsp;an&nbsp;access&nbsp;token&nbsp;is&nbsp;present,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1451"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1452"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodhasAccessToken">hasAccessToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1453"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_COOKIE</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$_COOKIE</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&gt;&nbsp;<span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1454"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1455"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1456"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1457"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Stores&nbsp;the&nbsp;given&nbsp;request&nbsp;token&nbsp;in&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1458"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1459"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$token&nbsp;</span><span class="src-doc">A&nbsp;PHP&nbsp;stdclass&nbsp;object&nbsp;containing&nbsp;the&nbsp;components&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a1460"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;OAuth&nbsp;request&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1461"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">on&nbsp;success,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1462"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1463"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodstoreRequestToken">storeRequestToken</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1464"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/headers_sent">headers_sent</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1465"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/setcookie">setcookie</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/base64_encode">base64_encode</a><span class="src-sym">(</span><a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">))</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>+&nbsp;<span class="src-num">600</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1466"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1467"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1468"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1469"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1470"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1471"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1472"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1473"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Fetches&nbsp;and&nbsp;returns&nbsp;the&nbsp;request&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1474"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1475"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">request&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1476"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1477"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodfetchRequestToken">fetchRequestToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1478"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><a href="http://www.php.net/base64_decode">base64_decode</a><span class="src-sym">(</span><span class="src-var">$_COOKIE</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1479"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1480"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1481"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1482"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Clears&nbsp;the&nbsp;request&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1483"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1484"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">on&nbsp;success,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1485"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1486"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodclearRequestToken">clearRequestToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1487"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/headers_sent">headers_sent</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1488"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/setcookie">setcookie</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;&quot;</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>-&nbsp;<span class="src-num">600</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1489"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1490"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1491"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1492"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1493"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1494"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1495"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1496"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Stores&nbsp;the&nbsp;given&nbsp;access&nbsp;token&nbsp;in&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1497"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1498"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$token&nbsp;</span><span class="src-doc">A&nbsp;PHP&nbsp;stdclass&nbsp;object&nbsp;containing&nbsp;the&nbsp;components&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a1499"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;OAuth&nbsp;access&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1500"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">on&nbsp;success,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1501"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1502"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodstoreAccessToken">storeAccessToken</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1503"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/headers_sent">headers_sent</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1504"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/setcookie">setcookie</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/base64_encode">base64_encode</a><span class="src-sym">(</span><a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">))</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1505"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>+&nbsp;<span class="src-sym">(</span><span class="src-num">30&nbsp;</span>*&nbsp;<span class="src-num">24&nbsp;</span>*&nbsp;<span class="src-num">60&nbsp;</span>*&nbsp;<span class="src-num">60</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1506"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1507"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1508"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1509"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1510"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1511"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1512"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1513"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Fetches&nbsp;and&nbsp;returns&nbsp;the&nbsp;access&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1514"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1515"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">access&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1516"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1517"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodfetchAccessToken">fetchAccessToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1518"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><a href="http://www.php.net/base64_decode">base64_decode</a><span class="src-sym">(</span><span class="src-var">$_COOKIE</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1519"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1520"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1521"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1522"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Clears&nbsp;the&nbsp;access&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1523"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1524"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">on&nbsp;success,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1525"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1526"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/CookieSessionStore.html#methodclearAccessToken">clearAccessToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1527"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/headers_sent">headers_sent</a><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1528"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/setcookie">setcookie</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;&quot;</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/time">time</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>-&nbsp;<span class="src-num">600</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1529"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1530"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1531"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1532"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1533"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1534"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1535"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1536"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1537"></a><span class="src-doc">&nbsp;*&nbsp;PHP&nbsp;session&nbsp;based&nbsp;implementation&nbsp;of&nbsp;the&nbsp;session&nbsp;store.&nbsp;This&nbsp;is&nbsp;the&nbsp;default</span></div></li>
<li><div class="src-line"><a name="a1538"></a><span class="src-doc">&nbsp;*&nbsp;session&nbsp;storage&nbsp;used&nbsp;by&nbsp;the&nbsp;Y!OS&nbsp;PHP&nbsp;SDK.&nbsp;Developers&nbsp;are&nbsp;free&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a1539"></a><span class="src-doc">&nbsp;*&nbsp;implement&nbsp;their&nbsp;own&nbsp;session&nbsp;store&nbsp;implementations&nbsp;and&nbsp;pass&nbsp;them&nbsp;to</span></div></li>
<li><div class="src-line"><a name="a1540"></a><span class="src-doc">&nbsp;*&nbsp;YahooSession::hasSession,&nbsp;YahooSession::requireSession&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a1541"></a><span class="src-doc">&nbsp;*&nbsp;YahooSession::clearSession.&nbsp;By&nbsp;default,&nbsp;if&nbsp;no&nbsp;session&nbsp;store&nbsp;is&nbsp;passed</span></div></li>
<li><div class="src-line"><a name="a1542"></a><span class="src-doc">&nbsp;*&nbsp;to&nbsp;YahooSession::hasSession&nbsp;or&nbsp;YahooSession::requireSession,&nbsp;an&nbsp;instance</span></div></li>
<li><div class="src-line"><a name="a1543"></a><span class="src-doc">&nbsp;*&nbsp;of&nbsp;a&nbsp;NativeSessionStore&nbsp;is&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a1544"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1545"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@brief</span><span class="src-doc">&nbsp;Native&nbsp;php&nbsp;session&nbsp;based&nbsp;implementation&nbsp;of&nbsp;the&nbsp;session&nbsp;store,&nbsp;by&nbsp;default</span></div></li>
<li><div class="src-line"><a name="a1546"></a><span class="src-doc">&nbsp;*&nbsp;&nbsp;stored&nbsp;on&nbsp;file&nbsp;system,&nbsp;but&nbsp;can&nbsp;be&nbsp;database&nbsp;or&nbsp;memcache&nbsp;backend.</span></div></li>
<li><div class="src-line"><a name="a1547"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1548"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html">NativeSessionStore</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1549"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1550"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodNativeSessionStore">NativeSessionStore</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1551"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$id&nbsp;</span>=&nbsp;<a href="http://www.php.net/session_id">session_id</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1552"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1553"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/session_start">session_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1554"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1555"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1556"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1557"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1558"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Indicates&nbsp;if&nbsp;the&nbsp;session&nbsp;store&nbsp;has&nbsp;a&nbsp;request&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1559"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1560"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">if&nbsp;a&nbsp;request&nbsp;token&nbsp;is&nbsp;present,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1561"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1562"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodhasRequestToken">hasRequestToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1563"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SESSION</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&gt;&nbsp;<span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1564"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1565"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1566"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1567"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Indicates&nbsp;if&nbsp;the&nbsp;session&nbsp;store&nbsp;has&nbsp;an&nbsp;access&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1568"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1569"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">True&nbsp;</span><span class="src-doc">if&nbsp;an&nbsp;access&nbsp;token&nbsp;is&nbsp;present,&nbsp;false&nbsp;otherwise.</span></div></li>
<li><div class="src-line"><a name="a1570"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1571"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodhasAccessToken">hasAccessToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1572"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$_SESSION</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&gt;&nbsp;<span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1573"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1574"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1575"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1576"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Stores&nbsp;the&nbsp;given&nbsp;request&nbsp;token&nbsp;in&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1577"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1578"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$token&nbsp;</span><span class="src-doc">A&nbsp;PHP&nbsp;stdclass&nbsp;object&nbsp;containing&nbsp;the&nbsp;components&nbsp;of&nbsp;the&nbsp;OAuth&nbsp;request&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1579"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1580"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodstoreRequestToken">storeRequestToken</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1581"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">'yosdk_rt'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1582"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1583"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1584"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1585"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Fetches&nbsp;and&nbsp;returns&nbsp;the&nbsp;request&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1586"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1587"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">request&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1588"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1589"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodfetchRequestToken">fetchRequestToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1590"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>?&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_rt&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1591"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1592"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1593"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1594"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Clears&nbsp;the&nbsp;request&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1595"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1596"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1597"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodclearRequestToken">clearRequestToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1598"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset<span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">'yosdk_rt'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1599"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1600"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1601"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1602"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Stores&nbsp;the&nbsp;given&nbsp;access&nbsp;token&nbsp;in&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1603"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1604"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$token&nbsp;</span><span class="src-doc">A&nbsp;PHP&nbsp;stdclass&nbsp;object&nbsp;containing&nbsp;the&nbsp;components&nbsp;of&nbsp;the&nbsp;OAuth&nbsp;access&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1605"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1606"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodstoreAccessToken">storeAccessToken</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1607"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">'yosdk_at'</span><span class="src-sym">]&nbsp;</span>=&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$token</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1608"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1609"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1610"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1611"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Fetches&nbsp;and&nbsp;returns&nbsp;the&nbsp;access&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1612"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1613"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">access&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1614"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1615"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodfetchAccessToken">fetchAccessToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1616"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>?&nbsp;<a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">&quot;yosdk_at&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>:&nbsp;<span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1617"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1618"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1619"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1620"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Clears&nbsp;the&nbsp;access&nbsp;token&nbsp;from&nbsp;the&nbsp;session&nbsp;store.</span></div></li>
<li><div class="src-line"><a name="a1621"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1622"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1623"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/NativeSessionStore.html#methodclearAccessToken">clearAccessToken</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1624"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset<span class="src-sym">(</span><span class="src-var">$_SESSION</span><span class="src-sym">[</span><span class="src-str">'yosdk_at'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1625"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1626"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1627"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1628"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1629"></a><span class="src-doc">&nbsp;*&nbsp;A&nbsp;simple&nbsp;OAuth&nbsp;client&nbsp;class&nbsp;for&nbsp;making&nbsp;2&nbsp;and&nbsp;3&nbsp;legged&nbsp;OAuth&nbsp;HTTP&nbsp;requests.</span></div></li>
<li><div class="src-line"><a name="a1630"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1631"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@brief</span><span class="src-doc">&nbsp;A&nbsp;simple&nbsp;OAuth&nbsp;client&nbsp;class&nbsp;for&nbsp;making&nbsp;2&nbsp;and&nbsp;3&nbsp;legged&nbsp;OAuth&nbsp;HTTP&nbsp;requests.</span></div></li>
<li><div class="src-line"><a name="a1632"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1633"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/OAuthClient.html">OAuthClient</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1634"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1635"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1636"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1637"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/OAuthClient.html#var$consumer">$consumer</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1638"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1639"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1640"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1641"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1642"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/OAuthClient.html#var$token">$token</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1643"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1644"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1645"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1646"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1647"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/OAuthClient.html#var$defaultTimeout">$defaultTimeout</a>&nbsp;=&nbsp;<span class="src-num">3</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1648"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1649"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1650"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1651"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1652"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/OAuthClient.html#var$oauthParamsLocation">$oauthParamsLocation</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1653"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1654"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1655"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1656"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1657"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/OAuthClient.html#var$signatureMethod">$signatureMethod</a>&nbsp;=&nbsp;<span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1658"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1659"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1660"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1661"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1662"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/OAuthClient.html#var$accepts">$accepts</a>&nbsp;=&nbsp;<span class="src-str">&quot;application/json&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1663"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1664"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1665"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Constructs&nbsp;a&nbsp;new&nbsp;OAuth&nbsp;client.</span></div></li>
<li><div class="src-line"><a name="a1666"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1667"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$consumer&nbsp;</span><span class="src-doc">The&nbsp;OAuthConsumer&nbsp;object&nbsp;to&nbsp;use&nbsp;for&nbsp;the&nbsp;requests.</span></div></li>
<li><div class="src-line"><a name="a1668"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$token&nbsp;</span><span class="src-doc">The&nbsp;OAuthToken&nbsp;to&nbsp;use&nbsp;for&nbsp;the&nbsp;requests.&nbsp;Optional.</span></div></li>
<li><div class="src-line"><a name="a1669"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$oauthParamsLocation&nbsp;</span><span class="src-doc">OAUTH_PARAMS_IN_HEADERS&nbsp;or&nbsp;OAUTH_PARAMS_IN_POST_BODY,&nbsp;depending&nbsp;on&nbsp;where&nbsp;you&nbsp;want&nbsp;the&nbsp;OAuth&nbsp;parameters&nbsp;to&nbsp;show&nbsp;up.&nbsp;Optional,&nbsp;defaults&nbsp;to&nbsp;using&nbsp;the&nbsp;headers.</span></div></li>
<li><div class="src-line"><a name="a1670"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$signatureMethod&nbsp;</span><span class="src-doc">OAUTH_SIGNATURE_PLAINTEXT&nbsp;or&nbsp;OAUTH_SIGNATURE_HMAC_SHA1,&nbsp;depending&nbsp;on&nbsp;what&nbsp;request&nbsp;signing&nbsp;mechanism&nbsp;to&nbsp;use.&nbsp;Optional,&nbsp;defaults&nbsp;to&nbsp;HMAC&nbsp;SHA1&nbsp;signatures.</span></div></li>
<li><div class="src-line"><a name="a1671"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1672"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/OAuthClient.html#methodOAuthClient">OAuthClient</a><span class="src-sym">(</span><span class="src-var">$consumer</span><span class="src-sym">,&nbsp;</span><span class="src-var">$token&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">,&nbsp;</span><span class="src-var">$oauthParamsLocation&nbsp;</span>=&nbsp;<span class="src-id">OAUTH_PARAMS_IN_HEADERS</span><span class="src-sym">,&nbsp;</span><span class="src-var">$signatureMethod&nbsp;</span>=&nbsp;<span class="src-id">OAUTH_SIGNATURE_HMAC_SHA1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1673"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$consumer">consumer</a>&nbsp;=&nbsp;<span class="src-var">$consumer</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1674"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$token">token</a>&nbsp;=&nbsp;<span class="src-var">$token</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1675"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$oauthParamsLocation">oauthParamsLocation</a>&nbsp;=&nbsp;<span class="src-var">$oauthParamsLocation</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1676"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1677"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$signatureMethod&nbsp;</span>==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_SIGNATURE_HMAC_SHA1">OAUTH_SIGNATURE_HMAC_SHA1</a></span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1678"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$signatureMethod">signatureMethod</a>&nbsp;=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthSignatureMethod_HMAC_SHA1.html">OAuthSignatureMethod_HMAC_SHA1</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1679"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1680"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$signatureMethod&nbsp;</span>==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_SIGNATURE_PLAINTEXT">OAUTH_SIGNATURE_PLAINTEXT</a></span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1681"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$signatureMethod">signatureMethod</a>&nbsp;=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../OAuth/OAuthSignatureMethod_PLAINTEXT.html">OAuthSignatureMethod_PLAINTEXT</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1682"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1683"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1684"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">Invalid&nbsp;signature&nbsp;method:&nbsp;<span class="src-var">$signatureMethod</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1685"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1686"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1687"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1688"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1689"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Executes&nbsp;a&nbsp;properly&nbsp;signed&nbsp;OAuth&nbsp;HTTP&nbsp;GET&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1690"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1691"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$url&nbsp;</span><span class="src-doc">The&nbsp;URL&nbsp;to&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1692"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$queryParameters&nbsp;</span><span class="src-doc">Any&nbsp;query&nbsp;string&nbsp;parameters&nbsp;to&nbsp;be&nbsp;sent&nbsp;in&nbsp;the&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1693"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$timeout&nbsp;</span><span class="src-doc">Optional,&nbsp;the&nbsp;number&nbsp;of&nbsp;seconds&nbsp;to&nbsp;wait&nbsp;for&nbsp;the&nbsp;request&nbsp;to&nbsp;return.</span></div></li>
<li><div class="src-line"><a name="a1694"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">response&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1695"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1696"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/OAuthClient.html#methodget">get</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">,&nbsp;</span><span class="src-var">$queryParameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$timeout&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1697"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;?&quot;</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1698"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">Put&nbsp;the&nbsp;query&nbsp;parameters&nbsp;in&nbsp;the&nbsp;second&nbsp;argument&nbsp;to&nbsp;OAuthClient::get(),&nbsp;not&nbsp;in&nbsp;the&nbsp;URL&nbsp;itself:&nbsp;URL&nbsp;=&nbsp;<span class="src-var">$url</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1699"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1700"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1701"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1702"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#methodrequest">request</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a1703"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;method&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;GET&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1704"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;url&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$url</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1705"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;query&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$queryParameters</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1706"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;timeout&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$timeout</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1707"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1708"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1709"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1710"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Executes&nbsp;a&nbsp;properly&nbsp;signed&nbsp;OAuth&nbsp;HTTP&nbsp;DELETE&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1711"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1712"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$url&nbsp;</span><span class="src-doc">The&nbsp;URL&nbsp;to&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1713"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$queryParameters&nbsp;</span><span class="src-doc">Any&nbsp;query&nbsp;string&nbsp;parameters&nbsp;to&nbsp;be&nbsp;sent&nbsp;in&nbsp;the&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1714"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$timeout&nbsp;</span><span class="src-doc">Optional,&nbsp;the&nbsp;number&nbsp;of&nbsp;seconds&nbsp;to&nbsp;wait&nbsp;for&nbsp;the&nbsp;request&nbsp;to&nbsp;return.</span></div></li>
<li><div class="src-line"><a name="a1715"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">response&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1716"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1717"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/OAuthClient.html#methoddelete">delete</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">,&nbsp;</span><span class="src-var">$queryParameters&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$timeout&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1718"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;?&quot;</span><span class="src-sym">)&nbsp;</span>!==&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1719"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">Put&nbsp;the&nbsp;query&nbsp;parameters&nbsp;in&nbsp;the&nbsp;second&nbsp;argument&nbsp;to&nbsp;OAuthClient::delete(),&nbsp;not&nbsp;in&nbsp;the&nbsp;URL&nbsp;itself:&nbsp;URL&nbsp;=&nbsp;<span class="src-var">$url</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1720"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1721"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1722"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1723"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#methodrequest">request</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a1724"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;method&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;DELETE&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1725"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;url&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$url</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1726"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;query&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$queryParameters</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1727"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;timeout&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$timeout</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1728"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1729"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1730"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1731"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Executes&nbsp;a&nbsp;properly&nbsp;signed&nbsp;OAuth&nbsp;HTTP&nbsp;PUT&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1732"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1733"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$url&nbsp;</span><span class="src-doc">The&nbsp;URL&nbsp;to&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1734"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$contentType&nbsp;</span><span class="src-doc">The&nbsp;Content-Type&nbsp;of&nbsp;the&nbsp;PUT&nbsp;data.</span></div></li>
<li><div class="src-line"><a name="a1735"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$content&nbsp;</span><span class="src-doc">The&nbsp;raw&nbsp;content&nbsp;to&nbsp;be&nbsp;PUT.</span></div></li>
<li><div class="src-line"><a name="a1736"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$timeout&nbsp;</span><span class="src-doc">Optional,&nbsp;the&nbsp;number&nbsp;of&nbsp;seconds&nbsp;to&nbsp;wait&nbsp;for&nbsp;the&nbsp;request&nbsp;to&nbsp;return.</span></div></li>
<li><div class="src-line"><a name="a1737"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">response&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1738"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1739"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/OAuthClient.html#methodput">put</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">,&nbsp;</span><span class="src-var">$contentType</span><span class="src-sym">,&nbsp;</span><span class="src-var">$content</span><span class="src-sym">,&nbsp;</span><span class="src-var">$timeout&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1740"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#methodrequest">request</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a1741"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;method&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;PUT&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1742"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;url&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$url</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1743"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;content&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$content</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1744"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;contentType&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$contentType</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1745"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;timeout&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$timeout</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1746"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1747"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1748"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1749"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Executes&nbsp;a&nbsp;properly&nbsp;signed&nbsp;OAuth&nbsp;HTTP&nbsp;POST&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1750"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1751"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$url&nbsp;</span><span class="src-doc">The&nbsp;URL&nbsp;to&nbsp;request.</span></div></li>
<li><div class="src-line"><a name="a1752"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$contentType&nbsp;</span><span class="src-doc">The&nbsp;Content-Type&nbsp;of&nbsp;the&nbsp;POST&nbsp;data.</span></div></li>
<li><div class="src-line"><a name="a1753"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$content&nbsp;</span><span class="src-doc">The&nbsp;content&nbsp;to&nbsp;be&nbsp;POST.</span></div></li>
<li><div class="src-line"><a name="a1754"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">$timeout&nbsp;</span><span class="src-doc">Optional,&nbsp;the&nbsp;number&nbsp;of&nbsp;seconds&nbsp;to&nbsp;wait&nbsp;for&nbsp;the&nbsp;request&nbsp;to&nbsp;return.</span></div></li>
<li><div class="src-line"><a name="a1755"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">The&nbsp;</span><span class="src-doc">response&nbsp;object.</span></div></li>
<li><div class="src-line"><a name="a1756"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1757"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/OAuthClient.html#methodpost">post</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">,&nbsp;</span><span class="src-var">$contentType&nbsp;</span>=&nbsp;<span class="src-str">&quot;application/x-www-form-urlencoded&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1758"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$content&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$timeout&nbsp;</span>=&nbsp;<span class="src-id">NULL</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1759"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#methodrequest">request</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a1760"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;method&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-str">&quot;POST&quot;</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1761"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;url&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$url</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1762"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;content&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$content</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1763"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;contentType&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$contentType</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1764"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">&quot;timeout&quot;&nbsp;</span>=&gt;&nbsp;<span class="src-var">$timeout</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1765"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1766"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1767"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1768"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1769"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1770"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/OAuthClient.html#methodrequest">request</a><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1771"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1772"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1773"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1774"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;query&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1775"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;query&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1776"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1777"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1778"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1779"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$combinedParams&nbsp;</span>=&nbsp;<a href="http://www.php.net/array_merge">array_merge</a><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a1780"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;query&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1781"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1782"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1783"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$combinedParams&nbsp;</span>=&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;query&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1784"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1785"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1786"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oauthRequest&nbsp;</span>=&nbsp;<span class="src-id"><a href="../OAuth/OAuthRequest.html">OAuthRequest</a></span><span class="src-sym">::</span><a href="../OAuth/OAuthRequest.html#methodfrom_consumer_and_token">from_consumer_and_token</a><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a1787"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$consumer">consumer</a><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$token">token</a><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;method&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1788"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;url&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$combinedParams</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1789"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oauthRequest</span><span class="src-sym">-&gt;</span><span class="src-id">sign_request</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$signatureMethod">signatureMethod</a><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$consumer">consumer</a><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1790"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$token">token</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1791"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1792"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$headers&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;Accept:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$accepts">accepts</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1793"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$oauthParamsLocation">oauthParamsLocation</a>&nbsp;==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_PARAMS_IN_HEADERS">OAUTH_PARAMS_IN_HEADERS</a></span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1794"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$headers</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$oauthRequest</span><span class="src-sym">-&gt;</span><span class="src-id">to_header</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1795"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1796"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>||&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$oauthParamsLocation">oauthParamsLocation</a>&nbsp;==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_PARAMS_IN_POST_BODY">OAUTH_PARAMS_IN_POST_BODY</a></span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1797"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$headers</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-str">&quot;Content-Type:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;contentType&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1798"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1799"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1800"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;query&quot;</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1801"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestUrl&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;%s?%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;url&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionoauth_http_build_query">oauth_http_build_query</a><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;query&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1802"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1803"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1804"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestUrl&nbsp;</span>=&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;url&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1805"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1806"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1807"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$requestTimeout&nbsp;</span>=&nbsp;<a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;timeout&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">)&nbsp;</span>?</div></li>
<li><div class="src-line"><a name="a1808"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;timeout&quot;</span><span class="src-sym">]&nbsp;</span>:&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$defaultTimeout">defaultTimeout</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1809"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1810"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ch&nbsp;</span>=&nbsp;<a href="http://www.php.net/curl_init">curl_init</a><span class="src-sym">(</span><span class="src-var">$requestUrl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1811"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_TIMEOUT</span><span class="src-sym">,&nbsp;</span><span class="src-var">$requestTimeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1812"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_RETURNTRANSFER</span><span class="src-sym">,&nbsp;</span><span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1813"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_HTTPHEADER</span><span class="src-sym">,&nbsp;</span><span class="src-var">$headers</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1814"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_CUSTOMREQUEST</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;method&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1815"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">((</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$oauthParamsLocation">oauthParamsLocation</a>&nbsp;==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_PARAMS_IN_POST_BODY">OAUTH_PARAMS_IN_POST_BODY</a></span><span class="src-sym">)&nbsp;</span>||</div></li>
<li><div class="src-line"><a name="a1816"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">)))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1817"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Content&nbsp;is&nbsp;an&nbsp;array,&nbsp;URL&nbsp;encode&nbsp;it.</span></div></li>
<li><div class="src-line"><a name="a1818"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#var$oauthParamsLocation">oauthParamsLocation</a>&nbsp;==&nbsp;<span class="src-id"><a href="../yos-social-php/_Yahoo.inc.html#defineOAUTH_PARAMS_IN_POST_BODY">OAUTH_PARAMS_IN_POST_BODY</a></span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1819"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$oauthRequest</span><span class="src-sym">-&gt;</span><span class="src-id">to_postdata</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1820"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_POSTFIELDS</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1821"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1822"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1823"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_POSTFIELDS</span><span class="src-sym">,&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionoauth_http_build_query">oauth_http_build_query</a><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1824"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1825"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1826"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1827"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Content&nbsp;is&nbsp;raw.</span></div></li>
<li><div class="src-line"><a name="a1828"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_POSTFIELDS</span><span class="src-sym">,&nbsp;</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1829"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1830"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1831"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Enable&nbsp;compressed&nbsp;responses&nbsp;from&nbsp;the&nbsp;servers.</span></div></li>
<li><div class="src-line"><a name="a1832"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_ENCODING</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1833"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1834"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Set&nbsp;the&nbsp;user&nbsp;agent&nbsp;so&nbsp;the&nbsp;SDK&nbsp;properly&nbsp;identifies&nbsp;itself&nbsp;for</span></div></li>
<li><div class="src-line"><a name="a1835"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;usage&nbsp;tracking&nbsp;purposes.&nbsp;Include&nbsp;the&nbsp;version&nbsp;of&nbsp;the&nbsp;SDK&nbsp;and</span></div></li>
<li><div class="src-line"><a name="a1836"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;version&nbsp;of&nbsp;PHP&nbsp;being&nbsp;used.</span></div></li>
<li><div class="src-line"><a name="a1837"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sdkVersion&nbsp;</span>=&nbsp;<span class="src-str">&quot;1.2&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1838"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$agent&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;YosPhpSdk/%s&nbsp;php/%s&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sdkVersion</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/phpversion">phpversion</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1839"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_USERAGENT</span><span class="src-sym">,&nbsp;</span><span class="src-var">$agent</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1840"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1841"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$headerParser&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../yos-social-php/YahooHeaderParser.html">YahooHeaderParser</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1842"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.php.net/curl_setopt">curl_setopt</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLOPT_HEADERFUNCTION</span><span class="src-sym">,&nbsp;</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">&amp;</span><span class="src-var">$headerParser</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;read&quot;</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1843"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<a href="http://www.php.net/curl_exec">curl_exec</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1844"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_bool">is_bool</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">!</span><span class="src-var">$response</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1845"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;Error&nbsp;making&nbsp;libcurl&nbsp;request(&quot;&nbsp;</span>.&nbsp;<span class="src-var">$requestUrl&nbsp;</span>.&nbsp;<span class="src-str">&quot;):&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/curl_error">curl_error</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1846"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1847"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1848"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1849"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$response&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a1850"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'method'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;method&quot;</span><span class="src-sym">]</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1851"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'url'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$requestUrl</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1852"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'code'&nbsp;</span>=&gt;&nbsp;<a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-id">CURLINFO_HTTP_CODE</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1853"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'requestHeaders'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$headers</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1854"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'requestBody'&nbsp;</span>=&gt;&nbsp;<span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span>?&nbsp;<span class="src-var">$request</span><span class="src-sym">[</span><span class="src-str">&quot;content&quot;</span><span class="src-sym">]&nbsp;</span>:&nbsp;<span class="src-id">NULL</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1855"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'responseHeaders'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$headerParser</span><span class="src-sym">-&gt;</span><span class="src-id">headers</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a1856"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'responseBody'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$response</span></div></li>
<li><div class="src-line"><a name="a1857"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1858"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1859"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1860"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">((</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>&gt;&nbsp;<span class="src-num">200</span><span class="src-sym">)&nbsp;</span>&amp;&amp;&nbsp;<span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]&nbsp;</span>&lt;&nbsp;<span class="src-num">300</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1861"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">&quot;HTTP&nbsp;request&nbsp;failed&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$response</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1862"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1863"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/OAuthClient.html#methodcheckExpired">checkExpired</a><span class="src-sym">(</span><span class="src-var">$response</span><span class="src-sym">[</span><span class="src-str">&quot;code&quot;</span><span class="src-sym">]</span><span class="src-sym">,&nbsp;</span><span class="src-var">$headerParser</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1864"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1865"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1866"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoddebug">debug</a><span class="src-sym">(</span><span class="src-str">&quot;HTTP&nbsp;request&nbsp;details&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$response</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1867"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1868"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$response</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1869"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1870"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1871"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1872"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Checks&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;code&nbsp;and&nbsp;headers&nbsp;indicate&nbsp;an&nbsp;expired&nbsp;OAuth&nbsp;token.</span></div></li>
<li><div class="src-line"><a name="a1873"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;If&nbsp;so,&nbsp;requests&nbsp;a&nbsp;new&nbsp;one.</span></div></li>
<li><div class="src-line"><a name="a1874"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a1875"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1876"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1877"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/OAuthClient.html#methodcheckExpired">checkExpired</a><span class="src-sym">(</span><span class="src-var">$code</span><span class="src-sym">,&nbsp;</span><span class="src-var">$headerParser</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1878"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$code&nbsp;</span>!=&nbsp;<span class="src-num">401</span><span class="src-sym">)&nbsp;</span><span class="src-key">return</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;HTTP&nbsp;Unauthorized</span></div></li>
<li><div class="src-line"><a name="a1879"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$authenticateHeader&nbsp;</span>=&nbsp;<span class="src-var">$headerParser</span><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-str">'WWW-Authenticate'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1880"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$authenticateHeader</span><span class="src-sym">)&nbsp;</span><span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1881"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/preg_match">preg_match</a><span class="src-sym">(</span><span class="src-str">'/oauth_problem=&quot;([^&quot;]+)&quot;/'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$authenticateHeader</span><span class="src-sym">,&nbsp;</span><span class="src-var">$match</span><span class="src-sym">))&nbsp;</span><span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1882"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$oauth_problem&nbsp;</span>=&nbsp;<span class="src-var">$match</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1883"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$oauth_problem&nbsp;</span>==&nbsp;<span class="src-str">'token_expired'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1884"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">'Access&nbsp;token&nbsp;expired.&nbsp;Please&nbsp;fetch&nbsp;a&nbsp;new&nbsp;one'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1885"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1886"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$oauth_problem&nbsp;</span>==&nbsp;<span class="src-str">'consumer_key_unknown'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1887"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">'Consumer&nbsp;Key&nbsp;unkown.&nbsp;&nbsp;Please&nbsp;check&nbsp;that&nbsp;the&nbsp;Consumer&nbsp;Key&nbsp;is&nbsp;valid.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1888"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1889"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$oauth_problem&nbsp;</span>==&nbsp;<span class="src-str">'additional_authorization_required'</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1890"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-id"><a href="../yos-social-php/YahooLogger.html">YahooLogger</a></span><span class="src-sym">::</span><a href="../yos-social-php/YahooLogger.html#methoderror">error</a><span class="src-sym">(</span><span class="src-str">'The&nbsp;app&nbsp;identified&nbsp;by&nbsp;this&nbsp;Consumer&nbsp;Key&nbsp;is&nbsp;not&nbsp;authorized&nbsp;to&nbsp;access&nbsp;this&nbsp;resource.&nbsp;&nbsp;Authorization&nbsp;is&nbsp;defined&nbsp;under&nbsp;Access&nbsp;Scopes&nbsp;on&nbsp;the&nbsp;application\'s&nbsp;settings&nbsp;page.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1891"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1892"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1893"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1894"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1895"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1896"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-tag">@private</span></div></li>
<li><div class="src-line"><a name="a1897"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1898"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooHeaderParser.html">YahooHeaderParser</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1899"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">var&nbsp;</span><a href="../yos-social-php/YahooHeaderParser.html#var$headers">$headers</a>&nbsp;=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1900"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1901"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooHeaderParser.html#methodYahooHeaderParser">YahooHeaderParser</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1902"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1903"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1904"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooHeaderParser.html#methodread">read</a><span class="src-sym">(</span><span class="src-var">$ch</span><span class="src-sym">,&nbsp;</span><span class="src-var">$header</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1905"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pos&nbsp;</span>=&nbsp;<a href="http://www.php.net/strpos">strpos</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;:&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1906"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$pos&nbsp;</span>!==&nbsp;<span class="src-id">FALSE</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1907"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$name&nbsp;</span>=&nbsp;<a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">,&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$pos</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1908"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$value&nbsp;</span>=&nbsp;<a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">,&nbsp;</span><span class="src-var">$pos&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1909"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooHeaderParser.html#var$headers">headers</a><span class="src-sym">[</span><span class="src-var">$name</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$value</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1910"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1911"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/strlen">strlen</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1912"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1913"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1914"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooHeaderParser.html#methodget">get</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1915"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">,&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooHeaderParser.html#var$headers">headers</a><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1916"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../yos-social-php/YahooHeaderParser.html#var$headers">headers</a><span class="src-sym">[</span><span class="src-var">$name</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1917"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1918"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1919"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">NULL</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1920"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1921"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1922"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1923"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1924"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1925"></a><span class="src-doc">&nbsp;*&nbsp;Interface&nbsp;to&nbsp;modify&nbsp;the&nbsp;underlying&nbsp;configuration&nbsp;of&nbsp;the&nbsp;library.</span></div></li>
<li><div class="src-line"><a name="a1926"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1927"></a><span class="src-key">class&nbsp;</span><a href="../yos-social-php/YahooConfig.html">YahooConfig</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1928"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooConfig.html#methodsetSocialWsHostname">setSocialWsHostname</a><span class="src-sym">(</span><span class="src-var">$hostname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1929"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1930"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;SOCIAL_WS_HOSTNAME&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$hostname</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1931"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1932"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1933"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooConfig.html#methodsetPresenceWsHostname">setPresenceWsHostname</a><span class="src-sym">(</span><span class="src-var">$hostname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1934"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1935"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;PRESENCE_WS_HOSTNAME&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$hostname</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1936"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1937"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1938"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooConfig.html#methodsetUpdatesWsHostname">setUpdatesWsHostname</a><span class="src-sym">(</span><span class="src-var">$hostname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1939"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1940"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;UPDATES_WS_HOSTNAME&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$hostname</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1941"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1942"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1943"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooConfig.html#methodsetQueryWsHostname">setQueryWsHostname</a><span class="src-sym">(</span><span class="src-var">$hostname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1944"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1945"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;QUERY_WS_HOSTNAME&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$hostname</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1946"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1947"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1948"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooConfig.html#methodsetOauthHostname">setOauthHostname</a><span class="src-sym">(</span><span class="src-var">$hostname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1949"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1950"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;OAUTH_HOSTNAME&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$hostname</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1951"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1952"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1953"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/YahooConfig.html#methodsetYapWsHostname">setYapWsHostname</a><span class="src-sym">(</span><span class="src-var">$hostname</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1954"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">global&nbsp;</span><span class="src-var">$YahooConfig</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1955"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$YahooConfig</span><span class="src-sym">[</span><span class="src-str">&quot;YAP_WS_HOSTNAME&quot;</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$hostname</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1956"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1957"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1958"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1959"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1960"></a><span class="src-doc">&nbsp;*&nbsp;An&nbsp;OAuth&nbsp;compatible&nbsp;version&nbsp;of&nbsp;http_build_query.&nbsp;http_build_query</span></div></li>
<li><div class="src-line"><a name="a1961"></a><span class="src-doc">&nbsp;*&nbsp;doesn't&nbsp;work&nbsp;because&nbsp;it&nbsp;turns&nbsp;spaces&nbsp;into&nbsp;&quot;+&quot;,&nbsp;which&nbsp;isn't&nbsp;allowed</span></div></li>
<li><div class="src-line"><a name="a1962"></a><span class="src-doc">&nbsp;*&nbsp;by&nbsp;OAuth.</span></div></li>
<li><div class="src-line"><a name="a1963"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1964"></a><span class="src-key">function&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionoauth_http_build_query">oauth_http_build_query</a><span class="src-sym">(</span><span class="src-var">$parameters</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1965"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$strings&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1966"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$parameters&nbsp;</span><span class="src-key">as&nbsp;</span><span class="src-var">$name&nbsp;</span>=&gt;&nbsp;<span class="src-var">$value</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1967"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$strings</span><span class="src-sym">[</span><span class="src-sym">]&nbsp;</span>=&nbsp;<a href="http://www.php.net/sprintf">sprintf</a><span class="src-sym">(</span><span class="src-str">&quot;%s=%s&quot;</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/rawurlencode">rawurlencode</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/rawurlencode">rawurlencode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1968"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1969"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$query&nbsp;</span>=&nbsp;<a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">&quot;&amp;&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-var">$strings</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1970"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$query</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1971"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1972"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1973"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a1974"></a><span class="src-doc">&nbsp;*&nbsp;PHP4/5&nbsp;compatibility&nbsp;functions</span></div></li>
<li><div class="src-line"><a name="a1975"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a1976"></a><span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">&quot;property_exists&quot;</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1977"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionproperty_exists">property_exists</a><span class="src-sym">(&nbsp;</span><span class="src-var">$class</span><span class="src-sym">,&nbsp;</span><span class="src-var">$property&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1978"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(&nbsp;</span><span class="src-var">$class&nbsp;</span><span class="src-sym">)&nbsp;)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1979"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$vars&nbsp;</span>=&nbsp;<a href="http://www.php.net/get_object_vars">get_object_vars</a><span class="src-sym">(&nbsp;</span><span class="src-var">$class&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1980"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1981"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$vars&nbsp;</span>=&nbsp;<a href="http://www.php.net/get_class_vars">get_class_vars</a><span class="src-sym">(&nbsp;</span><span class="src-var">$class&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1982"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1983"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(&nbsp;</span><span class="src-var">$property</span><span class="src-sym">,&nbsp;</span><span class="src-var">$vars&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1984"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1985"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1986"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1987"></a><span class="src-comm">//&nbsp;If&nbsp;json_decode&nbsp;doesn't&nbsp;exist,&nbsp;then&nbsp;php-json&nbsp;must&nbsp;not&nbsp;be&nbsp;included&nbsp;in&nbsp;this</span></div></li>
<li><div class="src-line"><a name="a1988"></a><span class="src-comm">//&nbsp;version&nbsp;of&nbsp;PHP.&nbsp;Include&nbsp;fake&nbsp;versions&nbsp;of&nbsp;json_encode/json_decode&nbsp;that</span></div></li>
<li><div class="src-line"><a name="a1989"></a><span class="src-comm">//&nbsp;are&nbsp;backed&nbsp;by&nbsp;the&nbsp;native&nbsp;PHP&nbsp;php-json&nbsp;library,&nbsp;which&nbsp;is&nbsp;available&nbsp;in&nbsp;PEAR.</span></div></li>
<li><div class="src-line"><a name="a1990"></a><span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/function_exists">function_exists</a><span class="src-sym">(</span><span class="src-str">&quot;json_decode&quot;</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1991"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Only&nbsp;include&nbsp;JSON.php&nbsp;if&nbsp;someone&nbsp;else&nbsp;hasn't&nbsp;already.&nbsp;Depending&nbsp;on</span></div></li>
<li><div class="src-line"><a name="a1992"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;the&nbsp;operating&nbsp;environment,&nbsp;other&nbsp;code&nbsp;may&nbsp;have&nbsp;brought&nbsp;their&nbsp;own</span></div></li>
<li><div class="src-line"><a name="a1993"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;version&nbsp;of&nbsp;that&nbsp;source&nbsp;code.</span></div></li>
<li><div class="src-line"><a name="a1994"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/class_exists">class_exists</a><span class="src-sym">(</span><span class="src-str">&quot;Services_JSON&quot;</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1995"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-inc">include_once</span><span class="src-sym">(</span><span class="src-str">&quot;JSON.php&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a1996"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a1997"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a1998"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionjson_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$json</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a1999"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$js&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../Services_JSON/Services_JSON.html">Services_JSON</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a2000"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$js</span><span class="src-sym">-&gt;</span><span class="src-id">decode</span><span class="src-sym">(</span><span class="src-var">$json</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a2001"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a2002"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a2003"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../yos-social-php/_Yahoo.inc.html#functionjson_encode">json_encode</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a2004"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$js&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../Services_JSON/Services_JSON.html">Services_JSON</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a2005"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$js</span><span class="src-sym">-&gt;</span><span class="src-id">encode</span><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a2006"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a2007"></a><span class="src-sym">}</span></div></li>
</ol></div>
</div>
	<p class="notes" id="credit">
		Documentation generated on Thu, 22 Oct 2009 12:54:51 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</body>
</html>